These are chat archives for fossasia/open-event-server

30th
Jul 2017
Sumedh Nimkarde
@lunaticmonk
Jul 30 2017 15:30
@shubham-padia Is the open-event-api.herokuapp.com updated for the change of link for the 'notifications'. I am getting 500 for GET request on v1/users/{user_id}/notifications
Sumedh Nimkarde
@lunaticmonk
Jul 30 2017 16:24
@shubham-padia resolved it. Its working fine. My token was giving 500. Thanks.
Afroz Ahamad
@enigmaeth
Jul 30 2017 16:24
:+1:
Dilpreet Singh
@geekyd
Jul 30 2017 19:40

Hey,
I'm trying to update an event that I created but i'm unable to update it, getting error 403 Access Forbidden
Endpoint

/v1/events

Payload

{
   "data":{
      "attributes":{
         "name":"PyCon Pune 2018",
         "description":"PyCon, the gathering for the community using and developing the open-source Python programming language. During PyCon Pune, the community will meet for two days of talks and work on upstream projects in two days of dev sprint.",
         "starts-at":"2018-02-07T18:30:00.000Z",
         "ends-at":"2018-02-11T11:30:41.491Z",
         "timezone":"Asia/Calcutta",
         "location-name":"Pune, Maharashtra, India",
         "searchable-location-name":null,
         "longitude":73.8567436999999,
         "latitude":18.5204303,
         "logo-url":null,
         "original-image-url":null,
         "is-map-shown":true,
         "is-sponsors-enabled":true,
         "is-ticketing-enabled":false,
         "is-sessions-speakers-enabled":false,
         "is-tax-enabled":false,
         "can-pay-by-paypal":false,
         "can-pay-by-stripe":false,
         "can-pay-by-cheque":false,
         "can-pay-by-bank":false,
         "can-pay-onsite":false,
         "payment-country":null,
         "payment-currency":"USD",
         "paypal-email":null,
         "cheque-details":null,
         "bank-details":null,
         "onsite-details":null,
         "has-organizer-info":false,
         "organizer-name":null,
         "organizer-description":"",
         "external-event-url":null,
         "ticket-url":null,
         "code-of-conduct":"",
         "state":"published",
         "privacy":"public"
      },
      "relationships":{
         "event-type":{
            "data":{
               "type":"event-type",
               "id":"2"
            }
         },
         "event-topic":{
            "data":{
               "type":"event-topic",
               "id":"7"
            }
         },
         "event-sub-topic":{
            "data":{
               "type":"event-sub-topic",
               "id":"1"
            }
         }
      },
      "type":"event",
      "id":"173"
   }
}

Response

{
   "jsonapi":{
      "version":"1.0"
   },
   "errors":[
      {
         "title":"Access Forbidden",
         "detail":"Access forbidden",
         "status":403,
         "source":{
            "source":""
         }
      }
   ]
}
Shubham Padia
@shubham-padia
Jul 30 2017 20:26
@geekyd Just to be sure, you are the creator of the event, right?
Dilpreet Singh
@geekyd
Jul 30 2017 20:27
Yes I'm
Shubham Padia
@shubham-padia
Jul 30 2017 20:28
Cool, I'll open the relevant issue
Thanks for the bug report.
Dilpreet Singh
@geekyd
Jul 30 2017 20:29
There is one more thing that I needed to ask
In sponsors API the level attribute will be an integer right?
Shubham Padia
@shubham-padia
Jul 30 2017 20:32
Yes, its string right now, should be int, thanks for pointing out.
Dilpreet Singh
@geekyd
Jul 30 2017 20:32
Thanks :)
Shubham Padia
@shubham-padia
Jul 30 2017 20:38
@geekyd Noticed just now, I think you forgot to provide the id of the event in case of PATCH :smile:
in the url
The error message is incorrect, we'll rectify it :smile:
Dilpreet Singh
@geekyd
Jul 30 2017 20:40
Sorry the endpoint I mentioned was generic
URL https://open-event-api.herokuapp.com/v1/events/14aa14b3
Shubham Padia
@shubham-padia
Jul 30 2017 20:41
okay thanks, I'll check accordingly.