Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

POST - Can't update event. #8

Description

@joshbruce

Hate to be a bother...sorry the other ticket had some of my extensions in there...still think I'm missing something.

$eb = new Eventbrite('OAUTH');
$event = $eb->get('events/:id');

Return (note capacity):

{  
   "code":200,
   "headers":{  
      "Server":[  
         "nginx"
      ],
      "Date":[  
         "Sun, 16 Apr 2017 20:28:46 GMT"
      ],
      "Content-Type":[  
         "application\/json"
      ],
      "Transfer-Encoding":[  
         "chunked"
      ],
      "Connection":[  
         "keep-alive"
      ],
      "x-xss-protection":[  
         "1; mode=block"
      ],
      "x-content-type-options":[  
         "nosniff"
      ],
      "Vary":[  
         "Accept, Accept-Encoding"
      ],
      "X-Rate-Limit":[  
      ],
      "Allow":[  
         "GET, POST, DELETE, HEAD, OPTIONS"
      ],
      "X-Frame-Options":[  
         "SAMEORIGIN"
      ],
      "Access-Control-Allow-Origin":[  
         "*"
      ],
      "Access-Control-Allow-Headers":[  
         "Authorization, Content-Type"
      ],
      "P3P":[  
         "CP=\"NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM\""
      ],
      "X-UA-Compatible":[  
         "IE=edge"
      ],
      "Set-Cookie":[  
      ]
   },
   "body":{  
      "name":{  
         "text":"TESTINGAPIINTEGRATIONWITHOURSITE",
         "html":"TESTINGAPIINTEGRATIONWITHOURSITE"
      },
      "description":{  
         "text":"This is the description. Looks like it can take images. Links...And horizontal rules.",
         "html":"<P>This is the description. Looks like it can take images. Links...<\/P><HR><P><BR><\/P><P>And horizontal rules.<\/P>"
      },
      "id":":id",
      "url":"https:\/\/www.eventbrite.com\/e\/testingapiintegrationwithoursite-tickets-:id",
      "start":{  
         "timezone":"America\/New_York",
         "local":"2017-09-01T19:00:00",
         "utc":"2017-09-01T23:00:00Z"
      },
      "end":{  
         "timezone":"America\/New_York",
         "local":"2017-09-30T22:00:00",
         "utc":"2017-10-01T02:00:00Z"
      },
      "created":"2017-04-15T19:36:08Z",
      "changed":"2017-04-16T17:55:41Z",
      "capacity":40,
      "capacity_is_custom":true,
      "status":"draft",
      "currency":"USD",
      "listed":false,
      "shareable":true,
      "invite_only":false,
      "password":"Testing the API and Integration with our site.",
      "online_event":false,
      "show_remaining":true,
      "tx_time_limit":480,
      "hide_start_date":false,
      "hide_end_date":false,
      "locale":"en_US",
      "is_locked":false,
      "privacy_setting":"unlocked",
      "is_series":false,
      "is_series_parent":false,
      "is_reserved_seating":false,
      "source":"create_2.0",
      "is_free":false,
      "version":"3.0.0",
      "logo_id":null,
      "organizer_id":":id",
      "venue_id":":id",
      "category_id":null,
      "subcategory_id":null,
      "format_id":null,
      "resource_uri":"https:\/\/www.eventbriteapi.com\/v3\/events\/:id\/",
      "logo":null
   }
}
// Would expect capacity to update     
$update = $eb->post('events/:id', ['event.capacity' => 30]);

Return is the same as above. Verify by recalling.

$event2 = $eb->get('events/:id');

Return is the same as above.

Again, Postman works just fine - as long as I have it set to form-data.

Thoughts? What am I missing?

Also tried

$update = $eb->post('events/:id', [
    'event' => [
        'capacity' => 30
    ]
]);

$update = $eb->post('events/:id', [
    'body' => [
        'event' => [
            'capacity' => 30
        ]
    ]
]);

$update = $eb->patch(
    'events/:id',
    ['event.capacity' => 30]
);

$update = $eb->put(
    'events/:id',
    ['event.capacity' => 30]
);

// Error because body is array
$update = $eb->call('POST', 'events/:id', [
    'body' => [
        'event' => [
            'capacity' => 30
        ]
    ]
]);

$update = $eb->call('POST', 'events/:id', [
    'event' => [
        'capacity' => 30
    ]
]);

$update = $eb->call('POST', 'events/:id', ['event.capacity' => 30]);

$update = $eb->makeRequest('POST', 'events/:id', ['event.capacity' => 30]);

// Error because body is array
$update = $eb->makeRequest(
    'POST',
    'events/:id',
    null,
    ['event.capacity' => 30]
);

$update = $eb->makeRequest(
    'POST',
    'events/:id',
    null,
    null,
    ['event.capacity' => 30]
);

$update = $eb->makeRequest(
    'POST',
    'events/:id',
    null,
    null,
    null,
    ['event.capacity' => 30]
);

See also #7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions