Package: altest-multiple-res
Getting Started with Multiple Responses Test APIGetting StartedInstall the PackageThe package is compatible with Python versions2 >=2.7.9and3 >=3.4.
Install the package from PyPi using the following pip command:pipinstallaltest-multiple-res==2.0.0You can also view the package at:https://pypi.python.org/pypi/altest-multiple-resInitialize the API ClientThe following parameters are configurable for the API Client:ParameterTypeDescriptiontimeoutfloatThe value to use for connection timeout.Default: 60max_retriesintThe number of times to retry an endpoint call if it fails.Default: 3backoff_factorfloatA backoff factor to apply between attempts after the second try.Default: 0The API client can be initialized as follows:frommultipleresponsestestapi.multipleresponsestestapi_clientimportMultipleresponsestestapiClientclient=MultipleresponsestestapiClient()Test the SDKYou can test the generated SDK and the server with test cases.unittestis used as the testing framework andnoseis used as the test runner. You can run the tests as follows:Navigate to the root directory of the SDK and run the following commandspip install -r test-requirements.txt
nosetestsClient Class DocumentationMultiple Responses Test APIClientThe gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK.ControllersNameDescriptionsend_messagesProvides access to SendMessagesControllerAPI ReferenceList of APIsSend MessagesSend MessagesOverviewGet instanceAn instance of theSendMessagesControllerclass can be accessed from the API Client.send_messages_controller = client.send_messagesMultiple Responses Without Range:information_source:NoteThis endpoint does not require authentication.defmultiple_responses_without_range(self)Response TypeList of MultipleMessageModelExample Usageresult=send_messages_controller.multiple_responses_without_range()Example Response(as JSON)[{"from":"Littlecab","to":["+254700000001","+254700000002","+254700000003"],"text":"Welcome to our Little world."}]ErrorsHTTP Status CodeError DescriptionException Class404Not foundFailureResponseModelException500Internal server errorFailureResponseModelExceptionDefaultContinueSuccessResponseModelExceptionMultiple Responses With Range:information_source:NoteThis endpoint does not require authentication.defmultiple_responses_with_range(self)Response TypeList of MultipleMessageModelExample Usageresult=send_messages_controller.multiple_responses_with_range()Example Response(as JSON)[{"from":"Littlecab","to":["+254700000001","+254700000002","+254700000003"],"text":"Welcome to our Little world."}]ErrorsHTTP Status CodeError DescriptionException Class404Not foundFailureResponseModelException500Internal server errorFailureResponseModelExceptionDefaultContinueSuccessResponseModelExceptionModel ReferenceStructuresSingle Message ModelMultiple Message ModelId TypeReasonSingle Message ModelAny payload to send a single message should be in this formatClass NameSingleMessageModelFieldsNameTypeTagsDescriptionmfromstringOptionalThe SMS header you would like to use, these should be registered under the account being managed by the API KEY used.tostringOptionalMobile number of the recipient of the message with the country code includedtextstringOptionalYour message to the recipient userExample (as JSON){"from":null,"to":null,"text":null}Multiple Message ModelAny payload to send a message to multiple numbers should be in this formatClass NameMultipleMessageModelFieldsNameTypeTagsDescriptionmfromstringOptionalThe SMS header you would like to use, these should be registered under the account being managed by the API KEY used.toList of stringOptionalList of mobile numbers in the international format receiving your messagetextstringOptionalYour message to the recipient userExample (as JSON){"from":null,"to":null,"text":null}Id TypeClass NameIdTypeFieldsNameTypeTagsDescriptionkindstring-channel_idstringOptional-video_idstringOptional-Example (as JSON){"kind":"kind8","channelId":null,"videoId":null}ReasonReason of the failureClass NameReasonFieldsNameTypeTagsDescriptionnamestringOptionalName of the error generatedmessagestringOptionalLiteral description of the error generatedExample (as JSON){"name":null,"message":null}ExceptionsSuccess Response ModelFailure Response ModelSuccess Response ModelAny successful response will have this formatClass NameSuccessResponseModelExceptionFieldsNameTypeTagsDescriptionstatusboolOptionalStatus of the response, when unsuccessful this value will befalsemessagestringOptionalSuccessful message to your previous request. Messages:*Request sent to queue=> "Your messages are being processed for delivery to your different recipients"Example (as JSON){"status":null,"message":null}Failure Response ModelAny unsuccessful response with have this formatClass NameFailureResponseModelExceptionFieldsNameTypeTagsDescriptionstatusboolOptionalStatus of the response, when successful this value will betruereasonReasonOptionalReason of the failureExample (as JSON){"status":null,"reason":null}Utility Classes DocumentationApiHelperA utility class for processing API Calls. Also contains classes for supporting standard datetime formats.MethodsNameDescriptionjson_deserializeDeserializes a JSON string to a Python dictionary.ClassesNameDescriptionHttpDateTimeA wrapper for datetime to support HTTP date format.UnixDateTimeA wrapper for datetime to support Unix date format.RFC3339DateTimeA wrapper for datetime to support RFC3339 format.Common Code DocumentationHttpResponseHttp response received.ParametersNameTypeDescriptionstatus_codeintThe status code returned by the server.reason_phrasestrThe reason phrase returned by the server.headersdictResponse headers.textstrResponse body.requestHttpRequestThe request that resulted in this response.HttpRequestRepresents a single Http Request.ParametersNameTypeTagDescriptionhttp_methodHttpMethodEnumThe HTTP method of the request.query_urlstrThe endpoint URL for the API request.headersdictoptionalRequest headers.query_parametersdictoptionalQuery parameters to add in the URL.parametersdict | stroptionalRequest body, either as a serialized string or else a list of parameters to form encode.filesdictoptionalFiles to be sent with the request.