| author | Sandro Knauß <knauss@netzguerilla.net> |
| Wed, 21 Dec 2011 22:07:28 +0100 | |
| changeset 89 | 48da990ddf8d |
| parent 75 | c6a281dafa7a |
| child 76 | 9f7da8dc8df8 |
| permissions | -rw-r--r-- |
| 73 | 1 |
# -*- coding: utf-8 -*- |
2 |
#Copyright (C) 2009 Sandro Knauß <bugs@sandroknauss.de> |
|
3 |
||
4 |
#This program is free software; you can redistribute it and/or modify it under the terms |
|
5 |
#of the GNU General Public License as published by the Free Software Foundation; |
|
6 |
#either version 3 of the License, or any later version. |
|
7 |
#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
|
8 |
#without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
9 |
#See the GNU General Public License for more details. |
|
10 |
||
11 |
#You should have received a copy of the GNU General Public License |
|
12 |
#along with this program; if not, see <http://www.gnu.org/licenses/>. |
|
13 |
||
14 |
class User: |
|
15 |
''' |
|
16 |
class for a xmlrpc user |
|
17 |
''' |
|
18 |
||
19 |
def status(self, apikey, id=None, detailed=False): |
|
20 |
u'''Gibt den aktuellen Status eines Auftrages zurück. |
|
21 |
||
22 |
Keywords: |
|
23 |
apikey[string]: Der API Key |
|
24 |
id[hash]: Eine Auftragsnummer |
|
25 |
detailed[boolean]: Details ausgeben |
|
26 |
||
27 |
Return: |
|
28 |
jobs[list]: Eine Liste der Aufträge. |
|
29 |
job.name[string]: Angebener Name |
|
30 |
job.status[string]: Status des Auftrages |
|
31 |
||
32 |
||
33 |
''' |
|
34 |
pass |
|
35 |
||
36 |
def stop(self, apikey,id): |
|
37 |
u'''Stoppt den angegeben Auftrag. |
|
38 |
||
39 |
Keywords: |
|
40 |
apikey[string]: Der API Key |
|
41 |
id[hash]: Eine Auftragsnummer |
|
42 |
||
43 |
Return: |
|
44 |
||
45 |
''' |
|
46 |
pass |
|
47 |
||
48 |
def sms(self, apikey, message, recipients, route="default"): |
|
49 |
u'''Versendet eine SMS. |
|
50 |
||
51 |
Keywords: |
|
52 |
apikey[string]: Der API Key |
|
53 |
message[string]: Nachricht |
|
54 |
recipients[list]: eine Liste von Emfänger-Nummern (gemäß ITU-T E.123) |
|
55 |
route[string|list]: Route über den geschickt werden soll, |
|
56 |
oder eine Liste von Routen, um Fallbacks anzugeben |
|
57 |
||
58 |
Return: |
|
59 |
id[hash]: Die ID des Auftrages |
|
60 |
||
61 |
''' |
|
62 |
pass |
|
63 |
||
64 |
||
65 |
def fax(self, apikey, subject, fax, recipients, route="default"): |
|
66 |
u'''Versendet ein FAX. |
|
67 |
||
68 |
Keywords: |
|
69 |
apikey[string]: Der API Key |
|
70 |
subject[string]: Der Betreff |
|
71 |
fax[string]: Das PDF base64 kodiert |
|
72 |
recipients[list]: Eine Liste von Emfänger-Nummern (gemäß ITU-T E.123) |
|
73 |
route[string|list]: Route über den geschickt werden soll, |
|
74 |
oder eine Liste von Routen, um Fallbacks anzugeben |
|
75 |
||
76 |
Return: |
|
77 |
id[hash]: Die ID des Auftrages |
|
78 |
||
79 |
''' |
|
80 |
pass |
|
81 |
||
82 |
def mail(self, apikey, subject, body, recipients, frm, route="default"): |
|
83 |
u'''Versendet eine Email. |
|
84 |
||
85 |
Keywords: |
|
86 |
apikey[string]: Der API Key |
|
87 |
subject[string]: Der Betreff |
|
88 |
body[string]: Der Email Body |
|
89 |
recipients[list]: Eine Liste von Emailadressen |
|
90 |
frm[string]: Die Absender Emailadresse |
|
91 |
route[string|list]: Route über den geschickt werden soll, |
|
92 |
oder eine Liste von Routen, um Fallbacks anzugeben |
|
93 |
||
94 |
Return: |
|
95 |
id[hash]: Die ID des Auftrages |
|
96 |
||
97 |
''' |
|
98 |
pass |
|
99 |
||
100 |
def routes(self, apikey, typ): |
|
101 |
u'''Gibt eine Liste aller verfügbaren Provider zurück. |
|
102 |
||
103 |
Keywords: |
|
104 |
apikey[string]: Der API Key |
|
105 |
typ[string]: Der Typ zu dem die Providerloste ausgeben werden soll |
|
106 |
Einer der Liste ["sms","fax","mail"] |
|
107 |
||
108 |
Return: |
|
109 |
providerlist[list]: Eine Liste aller möglichen Provider |
|
110 |
||
111 |
''' |
|
112 |
pass |
|
113 |
||
114 |
def defaultRoute(self, apikey, typ): |
|
115 |
u'''Gibt den Standardprovider zurück. |
|
116 |
|
|
117 |
Keywords: |
|
118 |
apikey[string]: Der API Key |
|
119 |
typ[string]: Der Typ zu dem die Providerloste ausgeben werden soll |
|
120 |
Einer der Liste ["sms","fax","mail"] |
|
121 |
||
122 |
Return: |
|
123 |
provider[string]: Der Standardprovider für den angeben Typ |
|
124 |
||
125 |
||
126 |
''' |
|
127 |
pass |
|
|
75
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
128 |
|
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
129 |
def statistic(self,apikey): |
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
130 |
u'''Gibt eine Statik zurück über die versendendeten Nachrichten und des Preises. |
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
131 |
|
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
132 |
Keywords: |
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
133 |
apikey[string]: Der API Key |
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
134 |
|
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
135 |
Return: |
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
136 |
statistic[list]: Eine Liste nach Nachrichtentypen |
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
137 |
''' |
|
c6a281dafa7a
adding statistic method for new api
Sandro Knauß <knauss@netzguerilla.net>
parents:
73
diff
changeset
|
138 |
pass |