Protocols/WebAPI/Reference/Types

From NINA Wiki
Revision as of 03:34, 26 March 2020 by AD (talk | contribs) (Created page with "{{Protocols/WebAPI}} Various data types that the methods return. == Capability == A capability allows clients to broadcast what featu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
WebAPI Protocol
Basic
Introduction
Clients
Whimsicals
Host Interaction
Flow
Authentication
Client
WebApp
Other Services
Foodgroups

Various data types that the methods return.

Capability

A capability allows clients to broadcast what features they are interested in or support. They are represented with UUIDs. When sending or receiving a capability with these APIs, use the 32 character hex encoding of the UUID.

32 character UUID example: 550e8400e29b41d4a716446655440000

Location

The Location Object contains field relating to a user's location.

Type Field Description
String desc Description
String street Street name
String city City name
String country Country name
String state State name
String postcode Postal code
String accuracy Measure of how accurate (in meters) location is
String lat Latitude
String lon Longitude
String accu_string Description of the accuracy level, ex Street|City|State, etc

QuietHours

Quiet hours

Type Field Description
String start Start time
String end End time

LocationAllow

Location Allow

Type Field Description
String aimId Allowed AIM id
Array of QuietHours quietHours Quiet hours

SmsSegment

The SMS Segment Object contains fields relating to segmenting IMs to send to SMS or IM Forwarding users

Type Field Description
Integer single Number of bytes that can be sent in a single segment message
Integer initial Number of bytes in the first segment of a multi-segment IM
Integer trailing Number of bytes in second or later segment of a multisegment IM

Presence

The Presence Object contains fields relating to a users' online availability.

Type Field Description
String aimId Compressed AIM loginId - use this to identify windows; does not change
String displayId Display AIM loginId - use this to display an aimId to the end user
String emailId Email address of user - only set when doing an email search
String friendly Friendly alias - not always set; this is a local friendly name for the user
Presence State state State of the aimId
Integer onlineTime Seconds online
Integer idleTime Minutes idle
Integer awayTime Seconds away
Integer statusTime Seconds since status message was changed
String awayMsg Away message in xhtml form
String profileMsg Profile message in xhtml form
String statusMsg Status message in utf8 form
String buddyIcon Buddy icon URL
String presenceIcon Presence icon URL
Integer memberSince When user joined AIM
Array of Capability capabilities Capabilities of the user
Location location Information that the user has provided about their location
String ipCountry Country of the user if known. Based on IP address. Only valid in myInfo objects
Boolean recent For buddylist events, any buddies in the Recent Buddies group will have this set
Boolean bot For buddylist events, any buddies that are BOTs will have this set
Boolean shared For buddylist events, any buddies in the a shared buddies group will have this set
SmsSegment smsSegment Information about SMS/IMF users
User Type userType Type of user

Group

The Group Object is used to subdivide Buddy lists.

Type Field Description
String name Name of Group
Boolean collapsed List of buddies not expanded
Boolean recent This group contains Recent Buddies
Boolean bot This group contains system added BOTs
Boolean shared This is a shared group
Array of Presence buddies Array of Users

Expression

The Expression Object points to the personal Expression data described in the Expression Type enumeration - buddy icons, arrival and departure sounds, and wallpaper.

Type Field Description
Expression Type type Type of the expression
String id Id of the expression
String url URL to fetch the binary data for the expression

Personality

The Personality Object points to the Personality name and contains the Expression data therein.

Type Field Description
String name Name of the personality
Array of Expression expressions Expression object contained in the personality

MyInfoEvent

The MyInfoEvent, when subscribed to, returns the user's personal profile and online availability. Please refer to the Presence datatype section for specific details.

Type Field Description
String type Will be "myInfo"
Presence eventData Presence Event Data

PresenceEvent

The PresenceEvent, when subscribed to, returns another user's personal profile and online availability. Please refer to the Presence datatype section for specific details.

As users on a logged-in AIM member's Buddy List change their Presence information (by logging in and out, changing their away message, etc.), Presence events are sent by the Web AIM API for pickup by the fetchEvents method.

Type Field Description
String type Will be "presence"
Presence eventData Presence Event Data

TypingEventData

The Typing Event Data indicates whether a user is typing or not. Please refer to the Typing Status section for details.

Type Field Description
String aimId Source user
Typing Status typingStatus Status

TypingEvent

The Typing Event is sent when a user's Typing Status changes.

Type Field Description
String type Will be "typing"
TypingEventData eventData Typing Event Data

DataIMEventData

The Data IM Event Data contains the actual data message as well as the source of the message, its type, and a timestamp.

Type Field Description
Presence source Presence information about the source user
Capability dataCapability AIM Capability to which the message was sent
Data IM Type dataType Type of Message
String dataIM Base64 encoded data sent from the source user
Integer timestamp UTC timestamp of when the IM was sent
String inviteMsg For invite types, the message if present

DataIMEvent

The IM Event will be retrieved by the fetchEvents method whenever a data IM is received by the user.

Type Field Description
String type Will be "dataIM"
DataIMEventData eventData Data for the Data IM Event

sentDataIMEventData

The Sent Data IM Event Data contains the actual data message as well as the destination of the message, its type, and a timestamp.

Type Field Description
Presence dest Presence information about the destination user. Actual presence information may not be known
Capability dataCapability AIM Capability to which the message was sent
Data IM Type dataType Type of Message
String dataIM Base64 encoded data sent from the source user
Integer timestamp UTC timestamp of when the IM was sent
String inviteMsg For invite types, the message if present

sentDataIMEvent

The Sent Data IM Event will be retrieved by the fetchEvents method whenever a data IM is sent by the user.

Type Field Description
String type Will be "sentDataIM"
sentDataIMEventData eventData Data for the Sent Data IM Event

IMEventData

The IM Event Data contains the actual IM message as well as the source of the message, its autoresponse status, and a timestamp.

Type Field Description
Presence source Presence information about the source user
String message IM from the source user
Boolean autoResponse Is this an autoresponse IM?
Integer timestamp UTC timestamp of when the IM was sent

IMEvent

The IM Event will be retrieved by the fetchEvents method whenever an IM is received by the user.

Type Field Description
String type Will be "im"
IMEventData eventData IM Event Data

sentIMEventData

The Sent IM Event Data contains the actual IM message as well as the destination of the message, its autoresponse status, and a timestamp.

Type Field Description
Presence dest Presence information about the source user. Actual online status may not be available
String message IM to the destination user
Boolean autoResponse Is this an autoresponse IM?
Integer timestamp UTC timestamp of when the IM was sent

sentIMEvent

The IM Event will be retrieved by the fetchEvents method whenever an IM is sent by the user.

Type Field Description
String type Will be "sentIM"
sentIMEventData eventData Sent IM Event Data

ClientErrorEventData

The Client Error Event Data contains the error data.

Type Field Description
Presence source Presence information about the source user
String cookie Base64 encoded conversation cookie
IM Channel channel Channel client reported error on
Client Error code Reason code
Reject Reason rejectReason For rendezvous rejects
String errorInfo Base64 encoded optional error information

ClientErrorEvent

The Client Error Event will be retrieved by the fetchEvents method whenever a client error is received by the user.

Type Field Description
String type Will be "clientError"
ClientErrorEventData eventData Data for the Data IM Event

OfflineIMEventData

The IM Event Data contains the actual IM message as well as the source of the message, its autoresponse status, and a timestamp.

Type Field Description
String aimId Source user
String message IM from the source user
Integer timestamp UTC timestamp of when the IM was sent

OfflineIMEvent

The IM Event will be retrieved by the fetchEvents method whenever an IM is received by the user.

Type Field Description
String type will be "offlineIM"
OfflineIMEventData eventData Offline IM Event Data

BuddyListEventData

The BuddyList Event Data contains the user's complete Buddy List, stored as an array of Buddy List groups.

Type Field Description
Array of Group groups groups inside the Buddy List

BuddyListEvent

The Buddy List Event is sent to fetchEvents when a user first authenticates and gives permission for the API to access his Buddy List.

Type Field Description
String type Will be "buddylist"
BuddyListEventData eventData Presence Event Data

SessionEndedEvent

This is the Session Ended Event from fetchEvents.

Type Field Description
String type Will be "sessionEnded"

Event

Event Object is a base class to all the different Events above.

Type Field Description
Event Type type Type of event
String eventData Data for event - see all the *Event types above.
Integer seqNum Identifier for event. Can be used as eventNumber with deleteEvent.

SendImSubCode

The subcode data returned with sendIM for mobile.

Type Field Description
Integer subError suberror code
String subReason reason of the failure

BuddyFeedItem

This is the Buddy Feed Data.

Type Field Description
String aimId Compressed AIM id
String title Title
String link Link
String domain Domain link is on
String description Description
String category Category
String pubDate Date
String author Author
String guid guid

RankedUsersLocation

Ranked Users Locations Information

Type Field Description
String name Description of point
Integer count Number of users
Float lat latitude
Float lon longitude

EventStatus

Event Status Information

Type Field Description
Integer event Event Number
Integer code Event Response Code

AddBuddyResultCode

The result code returned for each buddy object.

Type Field Description
String buddy buddy name
AddBuddyResultCodeValue resultCode Status code of each buddy as a result of an action

IMConversationLocation

IM Conversation Location Information

Type Field Description
String name Description of line
Integer count Number of users
Integer age How long ago
Float lat1 latitude1
Float lon1 longitude1
Float lat2 latitude2
Float lon2 longitude2

AIMFightUser

User's AIM Fight information

Type Field Description
String aimId Compressed AIM id
Integer score The users score
Integer rank If the user is in the top 5% their numerical rank starting at 1, otherwise 0

PDNameResult

The target name and status code data.

Type Field Description
String aimid aimid
PDResultCode statusCode status code returned for this aimid

PDResults

The result code returned for each object.

Type Field Description
Integer pdModeResult Result of setting pdMode
Array of PDNameResult allowResults Status code of each target in pdAllow
Array of PDNameResult blockResults Status code of each target in pdBlock
Array of PDNameResult IgnoreResults Status code of each target in pdIgnore
Array of PDNameResult allowRemoveResults Status code of each target in pdAllowRemove
Array of PDNameResult blockRemoveResults Status code of each target in pdBlockRemove
Array of PDNameResult IgnoreRemoveResults Status code of each target in pdIgnoreRemove