Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Angel S. Moreno
@angelxmoreno
this look familiar to anyone?
{ [Error: cannot GET /undefined?member_id=self&key=[my actual key] (401)]
        status: 401,
        text: '{"errors":[{"code":"auth_fail","message":"Invalid api key"}]}',
        method: 'GET',
        path: '/undefined?member_id=self&key=[my actual key] ' },
I am calling the getGroup method:
router.get('/groups', function (req, res, next) {
        req.meetup.getGroup({
            member_id: 'self'
        }, function (err, resp) {
            if(err){
                console.error('Found meetup error', err);
                return next(err);
            }
            res.send(resp);
        });
    });
Juan Pablo Kutianski
@jkutianski
Mmm... let me check.
Juan Pablo Kutianski
@jkutianski
getGroup = Fetches a Meetup Group by urlname
Probably you want to do getGroups
Juan Pablo Kutianski
@jkutianski
router.get('/groups', function (req, res, next) {
        req.meetup.getGroups({
            member_id: 'self'
        }, function (err, resp) {
            if(err){
                console.error('Found meetup error', err);
                return next(err);
            }
            res.send(resp);
        });
    });
@angelxmoreno hope this helps!
Angel S. Moreno
@angelxmoreno
@jkutianski you are correct. I can not get group details by its id, I must use its urlname. Seems a bit weird but it is outside the scope of the library. Thanks.
@jkutianski I guess a way around it would be to do a getGroups with the group id to get the urlname, then do another request to get the group details. Is the library compatible with the API's batch request feature?
Juan Pablo Kutianski
@jkutianski
member_id !== group_id. Can you elavorate the idea of /groups endpoint on your REST interface?
Angel S. Moreno
@angelxmoreno
@jkutianski what I mean is that my front-end view only has the group.id not the group.urlname so I would have to call getGroups() with the group.id to retrieve the group.urlname and then call getGroup() to actually get the group information
Angel S. Moreno
@angelxmoreno
thanks for the response on github @jkutianski
Juan Pablo Kutianski
@jkutianski
ok. But you are using member_id: self!
Angel S. Moreno
@angelxmoreno
oh, sorry, 2 seperate things. I was using member_id to grab all the groups that belong to the user. I understood what you said earlier. my thanks was for the question about batch requests :-)
Juan Pablo Kutianski
@jkutianski
to get the goup information you have to use
req.meetup.getGroups({
            group_id: gid
        },
Angel S. Moreno
@angelxmoreno
:+1: yep, got that sorted out
Juan Pablo Kutianski
@jkutianski
Happy to help.
Conor Graham
@conorg763
Is there a difference between the npm meetup and npm meetup api ?
Juan Pablo Kutianski
@jkutianski
@conorg763 https://www.npmjs.com/package/meetup is a little bit different.
Juan Pablo Kutianski
@jkutianski

This is a call to RSVPS stream on meetup module

mup.stream("/2/rsvps", function(stream){
  stream
    .on("data", function(item){
      console.log("got item " + item)
    }).on("error", function(e) {
       console.log("error! " + e)
    });
});

and this one is the same for meetup-api (long pooling)

meetup.getRSVPs(null, function(err, resp) {
   if (err) {
    console.log(err, resp);
})
Juan Pablo Kutianski
@jkutianski
Forget the last because I press ENTER instead of SHIFT + ENTER and I take the wrong function.
The meetup-api try to use Websockets for streams.
meetup.getStreamRSVPs()
    .on('data', function(item) {
        console.log("got item ", item);
    })
    .on('error', function(err) {
        console.log("error! ", err);
    })
    .on('close', function() {
        console.log("Stream closed!");
    });
Juan Pablo Kutianski
@jkutianski
meetup.getStreamRSVPs()is an endpoint agnostic call, but is much more work on my side when Meetup change the API because I've to maintain the endpoints.json
You can play a little bit with the meetup-api lib at TonicDev
Jeff Chiu
@Jeffchiucp
Hello everyone. I'm learning to use MeetUp API to perform a search option for an open source project
Juan Pablo Kutianski
@jkutianski
Sorry for the long delay. What information do you need?