ZebroidФорумПубличный разделПредложенияАрхивПоддержка синоимайзера thebestspiner

Поддержка синоимайзера thebestspiner

17 мая 2011, 03:12
Зарегистрирован: 12 ноября 2010, 13:31
Здравствуйте

это наверное лучший буржуйский синонимайзер... http://thebestspinner.com/

есть поддержка апи через пхп плагин я так понимаю не проблема написать будет...



authenticate

Before performing any other API queries, you first need to get a session identifier from the API. To do that, you pass your username and password to the API. Your POST should contain the following variables and values:

Variable Value

action authenticate

format (output format, either "php" or "xml" -- no quotes)

username (your login email address)

password (your password)

If you chose "php" as the format, the POST will return a serialized array, which you can use the PHP function unserialize() to convert into a normal PHP associative array. Otherwise an XML string will be returned. That array/XML will contain the following string values if successful:

Variable Value

success true

session (a unique session id -- you need to save this)

The session id must be passed for every call to the API.

(Any time an API call fails, the success value will be set to "false" with the reason for the failure contained in the "error" value.)

Once you have a session id, you can then call the identifySynonyms action or the replaceEveryonesFavorites action.

identifySynonyms

Variable Value

action identifySynonyms

format (output format, either "php" or "xml" -- no quotes)

text (the text to perform the synonym identification on)

maxsyns (the maximum number of synonyms to return for a word/phrase)

protectedterms (comma delimited list of words and phrases you don't want replaced)

Example:

Variable Value

action identifySynonyms

format php

text Losing weight can be a difficult thing to do.

maxsyns 3

When unserialized, the output from the above call will return an array containing the following:

Variable Value

success true

output {Losing weight|Reducing your weight|Slimming down|Shedding pounds} {can be a|can be quite a|is usually a|could be a} difficult {thing to do|move to make|activity|action to take}.

replaceEveryonesFavorites

Variable Value

action replaceEveryonesFavorites

format (output format, either "php" or "xml" -- no quotes)

text (the text to perform the synonym identification on)

maxsyns (the maximum number of synonyms to return for a word/phrase)

quality (1 = Good, 2 = Better, 3 = Best)

protectedterms (comma delimited list of words and phrases you don't want replaced)

Example:

Variable Value

action replaceEveryonesFavorites

format php

text Losing weight can be a difficult thing to do.

maxsyns 3

quality 1

When unserialized, the output from the above call will return an array containing the following:

Variable Value

success true

output {Losing|Dropping} {weight|pounds|fat} can be a {difficult|hard|tough} {thing|point|factor} to do.



rewriteText

Variable Value

action rewriteText

format (output format, either "php" or "xml" -- no quotes)

text (the text to auto-rewrite)

protectedterms (comma delimited list of words and phrases you don't want replaced)

Example:

Variable Value

action rewriteText

format php

text Modern diets can be dangerous, so be careful.

When unserialized, the output from the above call will return an array containing the following:

Variable Value

success true

output Modern diets could be harmful, so be cautious.

randomSpin

Variable Value

action randomSpin

text Spin-formatted text to return a randomly spun version of.

Calling randomSpin will return the following if successful:

Variable Value

success true

output (A randomly spun version of the spin-formatted text you passed.)

Example:

Variable Value

action randomSpin

format php

text {Losing|Dropping} {weight|pounds|fat} can be a {difficult|hard|tough} {thing|point|factor} to do.

When unserialized, one possible output from the above call will return an array containing the following:

Variable Value

success true

output Dropping pounds can be a hard thing to do.

apiQuota Depricated

Variable Value

action apiQuota

Calling apiQuota will return the following if successful:

Variable Value

success true

output (your account's remaining quota)

Since purchasing of quota has been disabled, this action is no longer necessary.

apiQueries

Variable Value

action apiQueries

Calling apiQuota will return the following if successful:

Variable Value

success true

output (the number of queries that have been performed today)



http://thebestspinner.com/apiexample.txt

тестил пример на денвере работает отлично...

качнуть можно тут http://thebestspinner.com/?action=getlatestversion

логин пас могу в пм кинуть



11 августа 2011, 15:44
Зарегистрирован: 08 августа 2011, 18:54
Nezavisim, прикрутил синонимайзер?



29 августа 2011, 05:15
Зарегистрирован: 12 ноября 2010, 13:31
нет, там через апи ограничения в 250 запросов в сутки, смысла нету особого. через сам синонимайзер делаю потом импорчу тхт