-
Notifications
You must be signed in to change notification settings - Fork 0
Service products
jradi3 edited this page Jul 18, 2012
·
9 revisions
| Method | Auth? | URL | Description |
|---|---|---|---|
| GET | false | /product/ | get all products |
| GET | false | /product?cateogry=:category | get all products given a category |
| GET | false | /product/:garage | get all garage's products |
| POST | true | /product | Dictionary structure : *idUser, *token, product:params {*idPessoa, valorEsperado, descricao, *nome, *idEstado, *idUser, categories, newPhotos, *currency}. Save a new product to some product. (*)obligatory |
| PUT | true | /product/:id | params: valor_esperado, descricao, nome, id_estado, id_pessoa categories. update some specific product |
| DELETE | true | /product/:id | remove some product |
//The server ask me for this format, so I set it here:
[postData setObject:[[GlobalFunctions getUserDefaults] objectForKey:@"token"] forKey:@"token"];
[postData setObject:idPerson forKey:@"idUser"];