API¶
SpinnerChief¶
- class spinnerchief.SpinnerChief(apikey, username, password)[source]¶
A class representing the Spinner Chief API (http://developer.spinnerchief.com/API_Document.aspx).
Articles must be in Unicode object type.
- URL = u'http://api.spinnerchief.com:9001/apikey={apikey}&username={username}&password={password}&'¶
URL for invoking the API
- _send_request(text='', params={'pos': '0', 'usehurricane': '1', 'spinhtml': '0', 'protecthtml': '0', 'percent': '0', 'phrasecount': '2', 'Chartype': '1', 'replacetype': '0', 'autospin': '1', 'thesaurus': 'English', 'convertbase': '0', 'Orderly': '0', 'Wordscount': '5', 'spinfreq': '4', 'tagprotect': '[]', 'spintype': '0', 'UseGrammarAI': '0', 'protectwords': None, 'rule': 'none', 'onecharforword': '0', 'wordquality': '0', 'original': '0'})[source]¶
Invoke Spinner Chief API with given parameters and return its response.
Parameters: params (dictionary) – parameters to pass along with the request Returns: API’s response (article) Return type: string
- _value_has(param, values, params)[source]¶
Raise WrongParameterVal if value of param is not in values.
Exceptions¶
- exception spinnerchief.exceptions.LoginError(api_error_msg)[source]¶
Raised if there are login errors.
- exception spinnerchief.exceptions.NetworkError(msg)[source]¶
Raised if there are network problems, like timeout.
- exception spinnerchief.exceptions.SpinnerChiefError(api_error_msg)[source]¶
Base class for exceptions in Spinner Chief module.