diff -r 4841b443f1fd -r f65edc0382cc doc/current.html --- a/doc/current.html Wed Apr 25 00:06:27 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,532 +0,0 @@ - - - - - - Iro · api docs current - - - - - - - - - - - -
- -
-
-
-
-

API Documentation

-
-

-

-
    -
  1. 1. Intro
  2. -
  3. 2. - Interfaces -
      -
    1. 2.1 XML-RPC
    2. -
    3. 2.2 SOAP
    4. -
    5. 2.3 JSON
    6. -
    7. 2.4 JSONP
    8. -
    -
  4. -
  5. 3. - Methods -
      -
    1. 3.1 Status
    2. 3.2 Sms
    3. 3.3 Fax
    4. 3.4 Mail
    5. 3.5 Routes
    6. 3.6 DefaultRoute
    7. 3.7 Bill
    8. 3.8 Telnumber
    9. 3.9 Email
    10. -
    -
  6. -
-
-

Intro

-

- Iro API has many methods, that are usefull if you want to send a bunch of messages. This Site describes the API for Iro 1.0. -

-
-

Interfaces

-

- You can use diffrent interfaces to get to same result. -

-
-

XML-RPC

-

- Interface-URI: http://localhost:8000/xmlrpc -

-
-
-

SOAP

-

- Interface-URI: http://localhost:8000/soap -

-
-
-

JSON

-

- Interface-URI: http://localhost:8000/json/<methode> -

-

- Not yet implementet -

-
-
-

JSONP

-

- Interface-URI: http://localhost:8000/jsonp/<methode>?callback=<callback> -

-

- Not yet implementet -

-
-
-

Methods

-
-

Status

-

status(user=None, id=False, detailed=None)

-

Returns the status of one or more jobs.

-
Parameter
- - - - - - - - - - - - - - - - - - - - - - - -
parametertypedescription
userstringapikey of a user
idintegerone job id
detailedbooleanreturn more details about the status
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returndict
    -
  • key -- is the job id
  • -
  • [key]['status'] -- status of the job
  • -
-
-

Sms

-

sms(user, message, recipients, route='default', info='')

-

Send a sms.

-
Parameter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
parametertypedescription
userstringapikey of a user
messagestringmessage
recipientslista list of telefon numbers (use ITU-T E.123)
routestring|listroute to use to send, or a list of routes as fallback
infostringa name, to combine different jobs to one billing group
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returnintegerthe job id
-
-

Fax

-

fax(user, subject, fax, recipients, route='default', info='')

-

Send a fax.

-
Parameter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
parametertypedescription
userstringapikey of a user
subjectstringsubject
faxstringcontent (base64 encoded)
recipientslista list of telefon numbers (use ITU-T E.123)
routestring|listroute to use to send, or a list of routes as fallback
infostringa name, to combine different jobs to one billing group
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returnintegerthe job id
-
-

Mail

-

mail(user, subject, body, recipients, frm=None, route='default', info='')

-

Send a mail.

-
Parameter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
parametertypedescription
userstringapikey of a user
subjectstringsubject
bodystringmail body
recipientslista list of email addresses
frmstringsender mail address
routestring|listroute to use to send, or a list of routes as fallback
infostringa name, to combine different jobs to one billing group
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returnintegerthe job id
-
-

Routes

-

routes(user, typ=None)

-

Returns a list of all possible offernames.

-
Parameter
- - - - - - - - - - - - - - - - - - - -
parametertypedescription
userstringapikey of a user
typstringa typ of message -- one of in this list ["sms","fax","mail"]
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returnlista list of all possible offer names for a typ
-
-

DefaultRoute

-

defaultRoute(user, typ=None)

-

Returns all default offernames.

-
Parameter
- - - - - - - - - - - - - - - - - - - -
parametertypedescription
userstringapikey of a user
typstringa typ of message -- one of in this list ["sms","fax","mail"]
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returnlista list of all possible offer names for a typ
-
-

Bill

-

bill(user=None)

-

Returns the bill, of not paid messages.

-
Parameter
- - - - - - - - - - - - - - - -
parametertypedescription
userstringapikey of a user
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returndict
    -
  • route -- one offer name ; "total" complete sum
  • -
  • [route][info][anz] -- Number of sended messages in one billing group
  • -
  • [route][info][price] -- Price for one billing group
  • -
  • [route | total][anz] -- Number of sended messages for one offer
  • -
  • [route | total][price] -- Price for one offer
  • -
-
-

Telnumber

-

telnumber(recipients)

-

Return True, if all telnumbers a vaild.

-
Parameter
- - - - - - - - - - - - - - - -
parametertypedescription
recipientslista list of telnumbers (use ITU-T E.123)
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returnbooleanTrue -- all numbers are valid
-
-

Email

-

email(recipients)

-

Return True, if all mailadresses a valid.

-
Parameter
- - - - - - - - - - - - - - - -
parametertypedescription
recipientslista list of mailadresses
-
Return
- - - - - - - - - - - - - - - -
parametertypedescription
returnbooleanTrue -- all addresses are valid
-
-
-
-
-
-
-
- -
- - \ No newline at end of file