Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Categories() (*models.Categories, error)
- func (c *Client) CommentOnEvent(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Comment, error)
- func (c *Client) CreateEvent(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Event, error)
- func (c *Client) DeleteEvent(eventID string) error
- func (c *Client) EventByID(urlName, eventID string) (*models.Event, error)
- func (c *Client) EventCommentByID(commentID int) (*models.Comment, error)
- func (c *Client) EventComments(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Comments, error)
- func (c *Client) EventRatings(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Ratings, error)
- func (c *Client) EventsByGeo(lat, lon, radius string) (*models.Events, error)
- func (c *Client) EventsByGroup(urlName string, status []string, desc bool) (*models.Events, error)
- func (c *Client) EventsByGroupID(groupID int, status []string, desc bool) (*models.Events, error)
- func (c *Client) GroupByID(groupIDs []int) (*models.Groups, error)
- func (c *Client) GroupByOrganizer(organizerIDs []int) (*models.Groups, error)
- func (c *Client) GroupByURLName(urlNames []string) (*models.Groups, error)
- func (c *Client) GroupByZip(zipCode int) (*models.Groups, error)
- func (c *Client) LikeComment(commentID int) error
- func (c *Client) Member(memberID int) (*models.Member, error)
- func (c *Client) Members(groupID int) (*models.Members, error)
- func (c *Client) RateEvent(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Rating, error)
- func (c *Client) RemoveEventComment(commentID int) error
- func (c *Client) UnlikeComment(commentID int) error
- func (c *Client) UpdateEvent(eventID string, prep func(map[string][]string, url.Values), ...) (*models.Event, error)
- type ClientOpts
- type Clienter
Constants ¶
const ( CommentID = "comment_id" CommentText = "comment" InReplyTo = "in_reply_to" MemberID = "member_id" GroupID = "group_id" EventID = "event_id" EventName = "name" Rating = "rating" GroupURLName = "group_urlname" Description = "description" PublishStatus = "publish_status" EventTime = "time" )
Commonly used query param or form field names. These can be used as the options passed to your eopts func and the keys in the map the configures the options.
const ( EventCancelled = "cancelled" EventDraft = "draft" EventPast = "past" EventProposed = "proposed" EventSuggested = "suggested" EventUpcoming = "upcoming" )
Status types to be used in Event queries
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a meetup client
func (*Client) Categories ¶
func (c *Client) Categories() (*models.Categories, error)
Categories returns available meetup categories
func (*Client) CommentOnEvent ¶
func (c *Client) CommentOnEvent(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Comment, error)
CommentOnEvent posts a comment to the specified event Required event options are EventID and CommentText Optionally, use InReplyTo to specify the comment ID in which to reply to
func (*Client) CreateEvent ¶
func (c *Client) CreateEvent(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Event, error)
CreateEvent posts a new event for the given group EventOpts required are GroupID, GroupURLName and EventName (name of the event) Optional Event Opts supported by this lib include Description, PublishStatus (organizer only) You can set more options with the passed prep func and map parameters to this method (see Meetup API docs for a full list)
func (*Client) DeleteEvent ¶
DeleteEvent removes a previously posted event with the given eventID
func (*Client) EventByID ¶
EventByID returns a single event with the specified group's url name and event ID
func (*Client) EventCommentByID ¶
EventCommentByID returns a single Comment using the provided comment id.
func (*Client) EventComments ¶
func (c *Client) EventComments(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Comments, error)
EventComments returns comments based on the query criteria provided with the EventOpts
func (*Client) EventRatings ¶
func (c *Client) EventRatings(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Ratings, error)
EventRatings returns the ratings for the given eventID options o is required to have at least an EventID and an optional MemberID
func (*Client) EventsByGeo ¶
EventsByGeo returns event data based on latitude, longitude and radius respectively. Radius can be a value of 'smart', or in between 0.5 and 100 If an empty string is passed for radius, then 'smart' will be used as a default
func (*Client) EventsByGroup ¶
EventsByGroup returns event data for the specified group with its urlName. Use these contstants to input status: EventCancelled, EventDraft, EventPast, EventProposed, EventSuggested, EventUpcoming
func (*Client) EventsByGroupID ¶
EventsByGroupID returns event data for the specified groupID. Use these contstants to input status: EventCancelled, EventDraft, EventPast, EventProposed, EventSuggested, EventUpcoming
func (*Client) GroupByID ¶
GroupByID returns the meetup groups using the specified groupIDs The response contains an array of results, even if there is only one because the request can consist of comma separated values as the group_id parameter.
func (*Client) GroupByOrganizer ¶
GroupByOrganizer returns the data the specified meetup groups using organizerIDs The response contains an array of results, even if there is only one because the request can consist of comma separated values as the group_id parameter.
func (*Client) GroupByURLName ¶
GroupByURLName returns the group data using the specified urlNames The response contains an array of results, even if there is only one because the request can consist of comma separated values as the group_id parameter.
func (*Client) GroupByZip ¶
GroupByZip returns the group data for the specified zip code
func (*Client) LikeComment ¶
LikeComment uses the specified commentID to 'like' it.
func (*Client) Members ¶
Members returns all of the members that belong to the specified meetup group
func (*Client) RateEvent ¶
func (c *Client) RateEvent(prep func(map[string][]string, url.Values), o map[string][]string) (*models.Rating, error)
RateEvent posts the provided rating to the specified eventID Use EventID and Rating as options
func (*Client) RemoveEventComment ¶
RemoveEventComment deletes a previously posted comment with the provided commentID
func (*Client) UnlikeComment ¶
UnlikeComment will remove a previously posted 'like' on the specified commentID
type ClientOpts ¶
ClientOpts contains options to be passed in when creating a new meetup client value
type Clienter ¶
type Clienter interface { Members(int) (*models.Members, error) Member(int) (*models.Member, error) GroupByID([]int) (*models.Groups, error) GroupByURLName([]string) (*models.Groups, error) GroupByOrganizer([]int) (*models.Groups, error) GroupByZip(int) (*models.Groups, error) Categories() (*models.Categories, error) EventsByGeo(string, string, string) (*models.Events, error) EventsByGroup(string, []string, bool) (*models.Events, error) EventByID(string, string) (*models.Event, error) EventsByGroupID(int, []string, bool) (*models.Events, error) EventComments(func(map[string][]string, url.Values), map[string][]string) (*models.Comments, error) EventCommentByID(int) (*models.Comment, error) EventRatings(func(map[string][]string, url.Values), map[string][]string) (*models.Ratings, error) RateEvent(func(map[string][]string, url.Values), map[string][]string) (*models.Rating, error) CommentOnEvent(func(map[string][]string, url.Values), map[string][]string) (*models.Comment, error) LikeComment(int) error UnlikeComment(int) error RemoveEventComment(int) error CreateEvent(func(map[string][]string, url.Values), map[string][]string) (*models.Event, error) UpdateEvent(string, func(map[string][]string, url.Values), map[string][]string) (*models.Event, error) DeleteEvent(string) error }
Clienter
func NewClient ¶
func NewClient(opts *ClientOpts) Clienter
NewClient creates a new Meetup client with the given parameters