Commit de609a9d36cd6f15a3854d6ac7d04506ed2db22f
1 parent
b885e6de
Ce fichier ne servait à rien
Showing
1 changed file
with
0 additions
and
230 deletions
Show diff stats
PremiereActivite/app/src/main/java/com/example/app_10p5/fonction_API_client.java deleted
... | ... | @@ -1,230 +0,0 @@ |
1 | - | |
2 | -/* | |
3 | - | |
4 | -public JSON client_ajouter(String logiLille1,String soldeini, String IdCarte, String decouvert){ | |
5 | - try{ | |
6 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/client/ajouter"); | |
7 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
8 | - postParameters.add(new BasicNameValuePair("loginLille1", loginLille1)); | |
9 | - postParameters.add(new BasicNameValuePair("soldeInitial",soldeini)); | |
10 | - postParameters.add(new BasicNameValuePair("idCarte", IdCarte)); | |
11 | - postParameters.add(new BasicNameValuePair("decouvertAutorise",decouvert)); | |
12 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
13 | - | |
14 | - HttpClient httpclient = new DefaultHttpClient(); | |
15 | - HttpResponse responce = httpclient.execute(httppost); | |
16 | - return(responce); | |
17 | - } | |
18 | - catch(Exception e) {} | |
19 | -} | |
20 | - | |
21 | - | |
22 | -public void client_carte(String logiLille1,String newIdCarte){ | |
23 | - try{ | |
24 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/client/carte"); | |
25 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
26 | - postParameters.add(new BasicNameValuePair("loginLille1", loginLille1)); | |
27 | - postParameters.add(new BasicNameValuePair("idCarte",newIdCarte)); | |
28 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
29 | - | |
30 | - HttpClient httpclient = new DefaultHttpClient(); | |
31 | - HttpResponse responce = httpclient.execute(httppost); | |
32 | - } | |
33 | - catch(Exception e) {} | |
34 | -} | |
35 | - | |
36 | -public JSON client_liste(){ | |
37 | - try{ | |
38 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/client/liste"); | |
39 | - | |
40 | - HttpClient httpclient = new DefaultHttpClient(); | |
41 | - HttpResponse responce = httpclient.execute(httppost); | |
42 | - return(responce); | |
43 | - } | |
44 | - catch(Exception e) {} | |
45 | -} | |
46 | - | |
47 | - | |
48 | -public void client_decouvert(String idCarte,String newDecouvertAutorise){ | |
49 | - try{ | |
50 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/client/decouvert"); | |
51 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
52 | - postParameters.add(new BasicNameValuePair("idCarte",idCarte)); | |
53 | - postParameters.add(new BasicNameValuePair("decouvertAutorise", newDecouvertAutorise)); | |
54 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
55 | - | |
56 | - HttpClient httpclient = new DefaultHttpClient(); | |
57 | - httpclient.execute(httppost); | |
58 | - } | |
59 | - catch(Exception e) {} | |
60 | -} | |
61 | - | |
62 | - | |
63 | -public JSON utilisateur_connexion(String login, String mdp, String idCarte, String loginLille1){ | |
64 | - try{ | |
65 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/utilisateur/connexion"); | |
66 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
67 | - postParameters.add(new BasicNameValuePair("login",idCarte)); | |
68 | - postParameters.add(new BasicNameValuePair("mdp",mdp)); | |
69 | - postParameters.add(new BasicNameValuePair("idCarte",idCarte)); | |
70 | - postParameters.add(new BasicNameValuePair("loginLille1", loginLille1)); | |
71 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
72 | - | |
73 | - HttpClient httpclient = new DefaultHttpClient(); | |
74 | - HttpResponse responce = httpclient.execute(httppost); | |
75 | - return(responce); | |
76 | - } | |
77 | - catch(Exception e) {} | |
78 | -} | |
79 | - | |
80 | -public void utilisateur_deconnexion(){ | |
81 | - try{ | |
82 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/utilisateur/deconnexion"); | |
83 | - | |
84 | - HttpClient httpclient = new DefaultHttpClient(); | |
85 | - httpclient.execute(httppost); | |
86 | - } | |
87 | - catch(Exception e) {} | |
88 | -} | |
89 | - | |
90 | - | |
91 | -public void utilisateur_mdp(String login, String newmdp){ | |
92 | - try{ | |
93 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/utilisateur/mdp"); | |
94 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
95 | - postParameters.add(new BasicNameValuePair("login",idCarte)); | |
96 | - postParameters.add(new BasicNameValuePair("mdp",newmdp)); | |
97 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
98 | - | |
99 | - HttpClient httpclient = new DefaultHttpClient(); | |
100 | - httpclient.execute(httppost); | |
101 | - } | |
102 | - catch(Exception e) {} | |
103 | -} | |
104 | - | |
105 | - | |
106 | -public void utilisateur_droit(String login, String newdroit){ | |
107 | - try{ | |
108 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/utilisateur/droit"); | |
109 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
110 | - postParameters.add(new BasicNameValuePair("login",idCarte)); | |
111 | - postParameters.add(new BasicNameValuePair("niveau de droit",newdroit)); | |
112 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
113 | - | |
114 | - HttpClient httpclient = new DefaultHttpClient(); | |
115 | - httpclient.execute(httppost); | |
116 | - } | |
117 | - catch(Exception e) {} | |
118 | -} | |
119 | - | |
120 | -public void utilisateur_ajouter(String login, String mdp, String loginLille1, String idCarte, String droit){ | |
121 | - try{ | |
122 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/utilisateur/ajouter"); | |
123 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
124 | - postParameters.add(new BasicNameValuePair("login",idCarte)); | |
125 | - postParameters.add(new BasicNameValuePair("mdp",mdp)); | |
126 | - postParameters.add(new BasicNameValuePair("loginLille1", loginLille1)); | |
127 | - postParameters.add(new BasicNameValuePair("idCarte",IdCarte)); | |
128 | - postParameters.add(new BasicNameValuePair("niveau de droit",droit)); | |
129 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
130 | - | |
131 | - HttpClient httpclient = new DefaultHttpClient(); | |
132 | - httpclient.execute(httppost); | |
133 | - } | |
134 | - catch(Exception e) {} | |
135 | -} | |
136 | - | |
137 | - | |
138 | - | |
139 | -public void utilisateur_carte(String login, String loginLille1, String idCarte){ | |
140 | - try{ | |
141 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/utilisateur/carte"); | |
142 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
143 | - postParameters.add(new BasicNameValuePair("login",idCarte)); | |
144 | - postParameters.add(new BasicNameValuePair("loginLille1", loginLille1)); | |
145 | - postParameters.add(new BasicNameValuePair("idCarte",newIdCarte)); | |
146 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
147 | - | |
148 | - HttpClient httpclient = new DefaultHttpClient(); | |
149 | - httpclient.execute(httppost); | |
150 | - } | |
151 | - catch(Exception e) {} | |
152 | -} | |
153 | - | |
154 | - | |
155 | -public void utilisateur_supprimer(String login){ | |
156 | - try{ | |
157 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/utilisateur/carte"); | |
158 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
159 | - postParameters.add(new BasicNameValuePair("login",idCarte)); | |
160 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
161 | - | |
162 | - HttpClient httpclient = new DefaultHttpClient(); | |
163 | - httpclient.execute(httppost); | |
164 | - } | |
165 | - catch(Exception e) {} | |
166 | -} | |
167 | - | |
168 | - | |
169 | -public JSON transaction_rechargement(String idCarte, String montant){ | |
170 | - try{ | |
171 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/transaction/rechargement"); | |
172 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
173 | - postParameters.add(new BasicNameValuePair("idCarte",idCarte)); | |
174 | - postParameters.add(new BasicNameValuePair("montant",montant)); | |
175 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
176 | - | |
177 | - HttpClient httpclient = new DefaultHttpClient(); | |
178 | - HttpResponse responce = httpclient.execute(httppost); | |
179 | - return(responce); | |
180 | - } | |
181 | - catch(Exception e) {} | |
182 | -} | |
183 | - | |
184 | - | |
185 | -public JSON transaction_paiementt(String idCarte, String montant, String nbConso){ | |
186 | - try{ | |
187 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/transaction/paiement"); | |
188 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
189 | - postParameters.add(new BasicNameValuePair("idCarte",idCarte)); | |
190 | - postParameters.add(new BasicNameValuePair("montant",montant)); | |
191 | - postParameters.add(new BasicNameValuePair("qte",nbConso)); | |
192 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
193 | - | |
194 | - HttpClient httpclient = new DefaultHttpClient(); | |
195 | - HttpResponse responce = httpclient.execute(httppost); | |
196 | - return(responce); | |
197 | - } | |
198 | - catch(Exception e) {} | |
199 | -} | |
200 | - | |
201 | - | |
202 | - | |
203 | -public JSON transaction_vidange(String idCarte){ | |
204 | - try{ | |
205 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/transaction/vidange"); | |
206 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
207 | - postParameters.add(new BasicNameValuePair("idCarte",idCarte)); | |
208 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
209 | - | |
210 | - HttpClient httpclient = new DefaultHttpClient(); | |
211 | - HttpResponse responce = httpclient.execute(httppost); | |
212 | - return(responce); | |
213 | - } | |
214 | - catch(Exception e) {} | |
215 | -} | |
216 | - | |
217 | - | |
218 | -public void transaction_annuler(String idTransac){ | |
219 | - try{ | |
220 | - Httppost httpost = new HttpPost("10p5.clubinfo.frogeye.fr/api/transaction/annuler"); | |
221 | - List<NameValuePair> postParameters = new ArrayList>NameValuePair>(); | |
222 | - postParameters.add(new BasicNameValuePair("id",idTransac)); | |
223 | - httppost.setEntity(new UrlEncodedFormEntity(postParameters)); | |
224 | - | |
225 | - HttpClient httpclient = new DefaultHttpClient(); | |
226 | - httpclient.execute(httppost); | |
227 | - } | |
228 | - catch(Exception e) {} | |
229 | -} | |
230 | -*/ | |
231 | 0 | \ No newline at end of file |