API Reference

Events.addMember

Adds a member to an event.

This can be used by registered users to add themselves to events within the vhosts their user is in. This requires the user to be logged in. In this case both "uid" and "memberType" should be left as their defaults.

This may also be used by privileged users (those with the events.addMember permission) to add other users within the event's vhost to a event with the specified member type.


Syntax

bool events.addMember ( int eventId, int uid = NULL, int memberType = 2 )

Arguments

NameTypeRequiredDefault valueDescription
eventIdintRequirednoneThe event ID you are adding the user to.
uidintOptionalNULLThe ID of the user you are adding to a event. The uid is NOT required since the logged-in user's id is used if a uid is not passed to this function.
memberTypeintOptional2The permissions you are giving the new member access to. The possible values are: 1 = invited, 2 = member, 9 = admin.

Response

Will return whether or not the member has been successfully added to the desired event.

NameTypeDescription
resultINTUpon success the response will be 1.

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/events/addMember?eventId=[EVENT_ID]&userId=[USER_ID]&memberType=[MEMBER_TYPE]
<?xml version="1.0" encoding="UTF-8"?>
<result>1</result>
Sample JSON Response
{
    "status": true,
    "result": 1
}

Code examples

0 comments

Be the first to comment on addMember.

Add a Comment

  • captcha