Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Info ClientInfo // contains filtered or unexported fields }
Client represents a RESTful client for IPS 4 API
type ClientInfo ¶
type ClientInfo struct { CommunityName string `json:"communityName"` // The name of the community CommunityURL string `json:"communityUrl"` // The community URL IPSVersion string `json:"ipsVersion"` // The Invision Community version number }
ClientInfo represents the response from the /core/hello endpoint which includes basic information about the running instance of Invision Community.
type Field ¶
type Field struct { Name string `json:"name"` // Field name Value string `json:"value"` // Field value }
Field represents a custom field in a member's profile
type FieldGroup ¶
type FieldGroup struct { Name string `json:"name"` // Group name Fields map[string]Field `json:"fields"` // Array of field objects }
FieldGroup represents a group of custom fields in a member's profile
type FieldGroups ¶
FieldGroups is a simpler structure for the above types that the official API uses. Those types are actually just maps keyed by numbers (y'know, like arrays, but more awkward). So this fix just unwraps the nested maps into flat maps and uses the names as keys.
type Group ¶
type Group struct { ID int `json:"id"` Name string `json:"name"` FormattedName string `json:"formattedName"` }
Group represents a forum member group
type MemberGet ¶
type MemberGet struct { ID int `json:"id"` // ID number Name string `json:"name"` // Username Title string `json:"title"` // Member title Timezone string `json:"timeZone"` // Member timezone FormattedName string `json:"formattedName"` // Username with group formatting PrimaryGroup Group `json:"primaryGroup"` // Primary group SecondaryGroups []Group `json:"secondaryGroups"` // Secondary groups Email string `json:"email"` // Email address Joined time.Time `json:"joined"` // Registration date RegistrationIPAddress string `json:"registrationIpAddress"` // IP address when registered WarningPoints int `json:"warningPoints"` // Number of warning points the member has been issued ReputationPoints int `json:"reputationPoints"` // Number of reputation points member has PhotoURL string `json:"photoUrl"` // URL to photo (which will be the site's default if they haven't set one) ProfileURL string `json:"profileUrl"` // URL to profile Validating bool `json:"validating"` // Whether or not the validating flag is set on the member account Posts int `json:"posts"` // Number of content item submissions member has made LastActivity time.Time `json:"lastActivity"` // Last activity date on the site LastVisit time.Time `json:"lastVisit"` // Last distinct visit date on the site LastPost time.Time `json:"lastPost"` // Latest content submission date ProfileViews int `json:"profileViews"` // Number of times member's profile has been viewed Birthday string `json:"birthday"` // Member birthday in MM/DD/YYYY format (or MM/DD format if no year has been supplied) OriginalCustomFields map[string]FieldGroup `json:"CustomFields"` // Custom profile fields CustomFields map[string]FieldGroups // some plonker decided the above field should be the worst possible format for such a simple data structure }
MemberGet represents a forum user response from a GET request