Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request to join #42

Open
williamespindola opened this issue Jun 18, 2017 · 0 comments
Open

request to join #42

williamespindola opened this issue Jun 18, 2017 · 0 comments
Milestone

Comments

@williamespindola
Copy link
Owner

williamespindola commented Jun 18, 2017

Request

POST /event/:eventid/request/join
Accept: Application/vnd.siren+json
Content-Type: Application/Json
Token: foo-bar-baz
{
  "user_id": "foo-bar-baz",
  "status": "Envited"
}

Response

Status: 201 Created
Content-Type: Application/vnd.siren+json
{
  "class":  ["request"],
  "properties": {
    "_id": "foo-bar-baz",
    "status": "Envited",
    "updated_at": "2016-09-09 10:10:10"
  },
  "entities": [
    {
      "class": ["user"],
      "rel": [ "http://x.io/rels/user" ],
      "properties": {
        "user_id": "foo-bar-baz",
        "name": "Peter Joseph"
      },
      "links": [
        { "rel": [ "self" ], "href": "http://api.x.io/user/:requestId" }
      ]
    }
  ],
  "actions" : [
    {
      "name": "delete-request",
      "title": "Delete request",
      "method": "DELETE",
      "href": "http://api.x.io/event/:eventid/request"
    },
    {
      "name": "edit-request",
      "title": "Edit request",
      "method": "PUT",
      "href": "http://api.x.io/event/:eventId/request/join/:requestId",
      "type": "application/json",
      "fields": [
        { "name": "status", "type": "text", "value": "Status name" },
      ]
    },
  ],
  "links": [
    { "rel": ["self"], "href": "http://api.x.io/event/:eventId/request/join/:requestId" }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant