|
@@ -16,7 +16,7 @@ PostgreSQL 11 minimum et la gem associée (`pg`).
|
16
|
16
|
3. `rails server` pour lancer un serveur local de développement sur le port 3000
|
17
|
17
|
|
18
|
18
|
### 2. Endpoints
|
19
|
|
-La commande `rails routes` fournie l'ensemble des endpoints et requêtes HTTP disponibles. L'ensemble des requêtes se font sur la base : localhost:3000/api/v1.
|
|
19
|
+La commande `rails routes` fournie l'ensemble des endpoints et requêtes HTTP disponibles. L'ensemble des requêtes se font sur la base : domaine.tld/api/v1.
|
20
|
20
|
|
21
|
21
|
## Tests
|
22
|
22
|
|
|
@@ -70,42 +70,38 @@ Patch et delete permettent de modifier ou supprimer une donnée qui a été cré
|
70
|
70
|
|
71
|
71
|
### Routes
|
72
|
72
|
|
73
|
|
-| Prefix | Verb | URI Pattern | Controller#Action |
|
74
|
|
-| -------------------- | ------ | ---------------------------------------------------------- | ------------------------------------------- |
|
75
|
|
-| api_v1_users| GET | /api/v1/users(.:format) | api/v1/users#index {:format=>:json} |
|
76
|
|
-| | POST | /api/v1/users(.:format) | api/v1/users#create {:format=>:json} |
|
77
|
|
-| api_v1_user| GET | /api/v1/users/:id(.:format) | api/v1/users#show {:format=>:json} |
|
78
|
|
-| | PATCH | /api/v1/users/:id(.:format) | api/v1/users#update {:format=>:json} |
|
79
|
|
-| | PUT | /api/v1/users/:id(.:format) | api/v1/users#update {:format=>:json} |
|
80
|
|
-| | DELETE | /api/v1/users/:id(.:format) | api/v1/users#destroy {:format=>:json} |
|
81
|
|
-| api_v1_tokens| POST | /api/v1/tokens(.:format) | api/v1/tokens#create {:format=>:json} |
|
82
|
|
-| api_v1_teams| GET | /api/v1/teams(.:format) | api/v1/teams#index {:format=>:json} |
|
83
|
|
-| | POST | /api/v1/teams(.:format) | api/v1/teams#create {:format=>:json} |
|
84
|
|
-| api_v1_team| GET | /api/v1/teams/:id(.:format) | api/v1/teams#show {:format=>:json} |
|
85
|
|
-| | PATCH | /api/v1/teams/:id(.:format) | api/v1/teams#update {:format=>:json} |
|
86
|
|
-| | PUT | /api/v1/teams/:id(.:format) | api/v1/teams#update {:format=>:json} |
|
87
|
|
-| | DELETE | /api/v1/teams/:id(.:format) | api/v1/teams#destroy {:format=>:json} |
|
88
|
|
-| api_v1_memberships| GET | /api/v1/memberships(.:format) | api/v1/memberships#index {:format=>:json} |
|
89
|
|
-| | POST | /api/v1/memberships(.:format) | api/v1/memberships#create {:format=>:json} |
|
90
|
|
-| api_v1_membership| GET | /api/v1/memberships/:id(.:format) | api/v1/memberships#show {:format=>:json} |
|
91
|
|
-| | PATCH | /api/v1/memberships/:id(.:format) | api/v1/memberships#update {:format=>:json} |
|
92
|
|
-| | PUT | /api/v1/memberships/:id(.:format) | api/v1/memberships#update {:format=>:json} |
|
93
|
|
-| | DELETE | /api/v1/memberships/:id(.:format) | api/v1/memberships#destroy {:format=>:json} |
|
94
|
|
-| api_v1_activity_tasks| GET | /api/v1/activities/:activity_id/tasks(.:format) | api/v1/tasks#index {:format=>:json} |
|
95
|
|
-| | POST | /api/v1/activities/:activity_id/tasks(.:format) | api/v1/tasks#create {:format=>:json} |
|
96
|
|
-| api_v1_activity_task| GET | /api/v1/activities/:activity_id/tasks/:id(.:format) | api/v1/tasks#show {:format=>:json} |
|
97
|
|
-| | PATCH | /api/v1/activities/:activity_id/tasks/:id(.:format) | api/v1/tasks#update {:format=>:json} |
|
98
|
|
-| | PUT | /api/v1/activities/:activity_id/tasks/:id(.:format) | api/v1/tasks#update {:format=>:json} |
|
99
|
|
-| | DELETE | /api/v1/activities/:activity_id/tasks/:id(.:format) | api/v1/tasks#destroy {:format=>:json} |
|
100
|
|
-| api_v1_activities| GET | /api/v1/activities(.:format) | api/v1/activities#index {:format=>:json} |
|
101
|
|
-| | POST | /api/v1/activities(.:format) | api/v1/activities#create {:format=>:json} |
|
102
|
|
-| api_v1_activity| GET | /api/v1/activities/:id(.:format) | api/v1/activities#show {:format=>:json} |
|
103
|
|
-| | PATCH | /api/v1/activities/:id(.:format) | api/v1/activities#update {:format=>:json} |
|
104
|
|
-| | PUT | /api/v1/activities/:id(.:format) | api/v1/activities#update {:format=>:json} |
|
105
|
|
-| | DELETE | /api/v1/activities/:id(.:format) | api/v1/activities#destroy {:format=>:json} |
|
106
|
|
-| api_v1_tasks| GET | /api/v1/tasks(.:format) | api/v1/tasks#index {:format=>:json} |
|
107
|
|
-| | POST | /api/v1/tasks(.:format) | api/v1/tasks#create {:format=>:json} |
|
108
|
|
-| api_v1_task| GET | /api/v1/tasks/:id(.:format) | api/v1/tasks#show {:format=>:json} |
|
109
|
|
-| | PATCH | /api/v1/tasks/:id(.:format) | api/v1/tasks#update {:format=>:json} |
|
110
|
|
-| | PUT | /api/v1/tasks/:id(.:format) | api/v1/tasks#update {:format=>:json} |
|
111
|
|
-| | DELETE | /api/v1/tasks/:id(.:format) | api/v1/tasks#destroy {:format=>:json} |
|
|
73
|
+| Prefix | Verb | URI Pattern | Controller#Action |
|
|
74
|
+| --------------------- | ------ | ---------------------------------------------------------- | ------------------------------------------- |
|
|
75
|
+| api_v1_users| GET | /api/v1/users(.:format) | api/v1/users#index {:format=>:json} |
|
|
76
|
+| | POST | /api/v1/users(.:format) | api/v1/users#create {:format=>:json} |
|
|
77
|
+| api_v1_user| GET | /api/v1/users/:id(.:format) | api/v1/users#show {:format=>:json} |
|
|
78
|
+| | PATCH | /api/v1/users/:id(.:format) | api/v1/users#update {:format=>:json} |
|
|
79
|
+| | PUT | /api/v1/users/:id(.:format) | api/v1/users#update {:format=>:json} |
|
|
80
|
+| | DELETE | /api/v1/users/:id(.:format) | api/v1/users#destroy {:format=>:json} |
|
|
81
|
+| api_v1_tokens| POST | /api/v1/tokens(.:format) | api/v1/tokens#create {:format=>:json} |
|
|
82
|
+|api_v1_team_memberships| GET | /api/v1/teams/:team_id/memberships(.:format) | api/v1/memberships#index {:format=>:json} |
|
|
83
|
+| | POST | /api/v1/teams/:team_id/memberships(.:format) | api/v1/memberships#create {:format=>:json} |
|
|
84
|
+| api_v1_team_membership| GET | /api/v1/teams/:team_id/memberships/:id(.:format) | api/v1/memberships#show {:format=>:json} |
|
|
85
|
+| |PATCH | /api/v1/teams/:team_id/memberships/:id(.:format) | api/v1/memberships#update {:format=>:json} |
|
|
86
|
+| | PUT | /api/v1/teams/:team_id/memberships/:id(.:format) | api/v1/memberships#update {:format=>:json} |
|
|
87
|
+| | DELETE | /api/v1/teams/:team_id/memberships/:id(.:format) | api/v1/memberships#destroy {:format=>:json} |
|
|
88
|
+| api_v1_teams| GET | /api/v1/teams(.:format) | api/v1/teams#index {:format=>:json} |
|
|
89
|
+| | POST | /api/v1/teams(.:format) | api/v1/teams#create {:format=>:json} |
|
|
90
|
+| api_v1_team| GET | /api/v1/teams/:id(.:format) | api/v1/teams#show {:format=>:json} |
|
|
91
|
+| | PATCH | /api/v1/teams/:id(.:format) | api/v1/teams#update {:format=>:json} |
|
|
92
|
+| | PUT | /api/v1/teams/:id(.:format) | api/v1/teams#update {:format=>:json} |
|
|
93
|
+| | DELETE | /api/v1/teams/:id(.:format) | api/v1/teams#destroy {:format=>:json} |
|
|
94
|
+| api_v1_memberships | GET | /api/v1/memberships(.:format) |api/v1/memberships#index {:format=>:json} |
|
|
95
|
+| api_v1_activity_tasks| GET | /api/v1/activities/:activity_id/tasks(.:format) | api/v1/tasks#index {:format=>:json} |
|
|
96
|
+| | POST | /api/v1/activities/:activity_id/tasks(.:format) | api/v1/tasks#create {:format=>:json} |
|
|
97
|
+| api_v1_activity_task| GET | /api/v1/activities/:activity_id/tasks/:id(.:format) | api/v1/tasks#show {:format=>:json} |
|
|
98
|
+| | PATCH | /api/v1/activities/:activity_id/tasks/:id(.:format) | api/v1/tasks#update {:format=>:json} |
|
|
99
|
+| | PUT | /api/v1/activities/:activity_id/tasks/:id(.:format) | api/v1/tasks#update {:format=>:json} |
|
|
100
|
+| | DELETE | /api/v1/activities/:activity_id/tasks/:id(.:format) | api/v1/tasks#destroy {:format=>:json} |
|
|
101
|
+| api_v1_activities| GET | /api/v1/activities(.:format) | api/v1/activities#index {:format=>:json} |
|
|
102
|
+| | POST | /api/v1/activities(.:format) | api/v1/activities#create {:format=>:json} |
|
|
103
|
+| api_v1_activity| GET | /api/v1/activities/:id(.:format) | api/v1/activities#show {:format=>:json} |
|
|
104
|
+| | PATCH | /api/v1/activities/:id(.:format) | api/v1/activities#update {:format=>:json} |
|
|
105
|
+| | PUT | /api/v1/activities/:id(.:format) | api/v1/activities#update {:format=>:json} |
|
|
106
|
+| | DELETE | /api/v1/activities/:id(.:format) | api/v1/activities#destroy {:format=>:json} |
|
|
107
|
+| api_v1_tasks| GET | /api/v1/tasks(.:format) | api/v1/tasks#index {:format=>:json} |
|