Jump to content

Community

REST API Documentation

/core/clubs


Create a club

For requests using an OAuth Access Token for a particular member, the authorized user will be the club owner, otherwise you must pass an owner parameter with a valid member ID to set the club owner


Parameters

Name Type Description
Required name string The club name
Required owner int The club owner (if not using an OAuth Access Token for a particular member)
about string Information about the club
type string Club type (one of public, open, private, readonly or closed). Defaults to open.
approved bool 0|1 Whether the club is approved or not (if not using an OAuth Access Token for a particular member)
featured bool 0|1 Whether the club is featured or not (if not using an OAuth Access Token for a particular member)
lat float Latitude of the club
long float Longitude of the club
joiningFee money object Cost to join the club (Nexus must be installed, paid clubs must be enabled, and the owner must be allowed to create paid clubs)
renewalTerm renewalterm object Renewal term for the club (joiningFee must be set)

Exceptions

Code Message Description
1C386/3 OWNER_REQUIRED An owner for the club is required. For requests NOT using an OAuth Access Token for a particular member, you must supply a member ID for the owner property
1C386/4 NAME_REQUIRED A name is required for the club
1C386/J CANNOT_CREATE The authorized member or supplied owner cannot create the type of club requested
1C386/K CLUB_LIMIT_REACHED The authorized member or supplied owner has reached the maximum number of clubs they are allowed to create based on group restrictions

Response

Name Type Description
id int ID number
name string Name
url string URL to the club
type string Type of club (public, open, closed, private, readonly)
approved bool Whether the club is approved or not
created datetime Datetime the club was created
memberCount int Number of members in the club
owner member object Club owner
photo string|null URL to the club's profile photo
paid bool Whether the club is paid or not
featured bool Whether the club is featured or not
location \IPS\GeoLocation|NULL Geolocation object representing the club's location, or NULL if no location is available
about string Club 'about' information supplied by owner
lastActivity datetime Datetime of last activity within the club
contentCount int Count of all content items + comments in the club
coverPhotoUrl string|NULL URL to the club's cover photo, or NULL if no cover photo is available
coverOffset string Cover photo offset
coverPhotoColor string Cover photo overlay background color
members array of member objects Club members
leaders array of member objects Club leaders
moderators array of member objects Club moderators
fieldValues array of field objects Club's custom field values
nodes array of model objects Nodes created for this club
joiningFee \IPS\nexus\Money|null Cost to join the club, or null if there is no cost
renewalTerm \IPS\nexus\Purchase\RenewalTerm|null Renewal term for the club, or null if there are no renewals

member object

Name Type Description
id int ID number
name string Username
title string Member title
timezone string Member timezone
formattedName string Username with group formatting
ipAddress string IP address used during registration
primaryGroup group object Primary group
secondaryGroups array of group objects Secondary groups
email string Email address
joined datetime Registration date
registrationIpAddress string IP address when registered
warningPoints int Number of active warning points
reputationPoints int Number of reputation points
photoUrl string URL to photo (which will be the site's default if they haven't set one)
photoUrlIsDefault bool Indicates if the value of photoUrl is the site's default
coverPhotoUrl string URL to profile cover photo (will be blank if there isn't one)
profileUrl string|null URL to profile
validating bool Whether or not the validating flag is set on the member account
posts int Number of content item submissions member has made
lastActivity datetime|null Last activity date on the site
lastVisit datetime|null Last distinct visit date on the site
lastPost datetime|null Latest content submission date
profileViews int Number of times member's profile has been viewed
birthday string Member birthday in MM/DD/YYYY format (or MM/DD format if no year has been supplied)
customFields array of fieldgroup objects Custom profile fields. For requests using an OAuth Access Token for a particular member, only fields the authorized user can view will be included

group object

Name Type Description
id int ID number
name string Name
formattedName string Name with formatting

fieldgroup object

Name Type Description
name string Group name
fields array of field objects Fields

field object

Name Type Description
name string Field name
value string Value

model object

Name Type Description
id int ID number
name string Name
url string URL
class string Node class
permissions object|null Node permissions
×
×
  • Create New...