Re: [meetup-api] API to Attend An Event = Yes

41 views
Skip to first unread message

Doug Tangren

unread,
May 12, 2013, 6:30:27 PM5/12/13
to meetup-api


On May 12, 2013 4:58 PM, <akl...@gmail.com> wrote:
>
> Hi,
>
> I am trying to look for the API to RSVP an event = YES.  Is this the correct API - "RSVP Create POST /ew/rsvp" (http://www.meetup.com/meetup_api/docs/ew/rsvp/) ?
>
> I am using Java to call these Meetup API and for the samples that I've created it is working OK (e.g. retrieve user's group, retrieve group's events, etc), but I am unable to make it work for RSVP Create.  Here is my sample Java program
>
>
>     public boolean rsvpYes() throws Exception
>     {
>         String urlText = "https://api.meetup.com/ew/rsvp/";
>         List<NameValuePair> params = new ArrayList<NameValuePair>(2);
>         params.add(new BasicNameValuePair("event_id", eventId));
>         params.add(new BasicNameValuePair("sign", "true"));
>         params.add(new BasicNameValuePair("key", getApiKey()));
>         MeetupRequest request = new MeetupRequest();
>         String response = request.postRequest(urlText, params);
>         System.out.println(response);
>
>         return false;
>     }
>
> And the postRequest()
>
>     public String postRequest(String urlText, List<NameValuePair> params) throws Exception
>     {
>         HttpClient httpclient = new DefaultHttpClient();
>         HttpPost httppost = new HttpPost(urlText);
>
>         // Request parameters and other properties.
>         httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
>
>         // Execute and get the response.
>         HttpResponse response = httpclient.execute(httppost);
>         HttpEntity entity = response.getEntity();
>
>         if (entity != null)
>         {
>             InputStream instream = entity.getContent();
>             BufferedReader input = new BufferedReader(new InputStreamReader(instream));
>             String responseText = input.readLine();
>             instream.close();
>             return responseText;
>         }
>         return "";
>     }
>
> And the returned response is
>
> {"details":"The given event_id 113321152 is not recoginized","problem":"The API request is malformed","code":"bad_request"}
>
> Is this the correct API to use?
>

I think you meant to use 2/rsvp instead. ew/rsvp is used for everywhere events.

> Thanks.
>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Meetup API" group.
> To unsubscribe from this group, send email to
> meetup-api+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/meetup-api?hl=en?hl=en
>  
> ---
> You received this message because you are subscribed to the Google Groups "Meetup API" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to meetup-api+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

Reply all
Reply to author
Forward
0 new messages