EQ Network C# SDK
(Download)

Table of Contents

Overview

SessionService
Create(), Check()

UserService
User Object, Get()
Create(), Update(), UploadIcon(), DeleteIcon(), Delete()
ListCollections(), Search(), ListUsers(), AddRelationship(), ListFavoritedContentFiles()
EmailAccounts(), RequestPasswordReset(), ResetPassword(), ResendConfirmationEmail()
LinkFacebook(), UnlinkFacebook(), LinkTwitter(), UnlinkTwitter() FacebookFindFriends(), TwitterFindFriends()
UpdateSocial(), SocialAdd(), SocialRemove()
Purchase(),

CollectionService
Collection Object, Get()
Create(), Update(), UploadIcon() DeleteIcon() Delete(),
ListContentFiles(), AddRelationship(),
SocialAdd() SocialRemove()
MarkAsViewed()

ContentFileService
ContentFile Object, Get()
Create(), CreateFromUrl(), Update(), UpdateSortBy(), ChangeCollection(), FlagAsInappropriate(), Delete(),
ListPosts(),
SocialAdd() SocialRemove()
MarkAsViewed()

PostService
Post Object, Get()
Create(), Update(), Delete()

UploadService
Upload Object, UploadContext Object,
Begin(), Complete(), CreateContentFile(),
ListUpload(), ListUploads(), UploadChunk(), CancelUpload() Upload Controller

InvitationService
Invitation Object, Accept(), Confirm(), Create(), Update(), Decline(), Delete()
ListInvitationsForCollection(), ListInvitationsForUser(), ListInvitationsToMe(), Resend(),

RequestService
Request Object, Accept(), Confirm(), Create(), Update(), Decline(), Delete()
ListRequestsForCollection(), ListRequestsForUser(), ListRequestsToMe(), GetCollectionRequestGuid(),

MiscService
ContentMenu: ContentMenu Object, ContentMenu_List()
Hashtags: Hashtag Object, Hashtag_Search(), Hashtag_Trending()
Categories: Category Object, Category_ListAll()
Activity: Activity_Create()

Search
Search Criteria,

Retrieving Media Content
DeliveryRequestId's and MuxKey's, Movie Url, Movie Preview Url, Thumbnail Url, Animated Gif Url, User Icon Url, Collection Icon Url

Utility Objects
PagingParameters


top
Overview
Equilibrium has developed a C# SDK that makes calls to the EQNetwork backend servers via it's Web API. The SDK supports both synchronous and asynchronous versions of each function call. In addition, a few "controllers" have been created that support higher level functions (e.g. uploads, support of infinite lists, etc...)

In order to use the EQNetwork SDK you must create a process. All commands will be made by calling services within this process. When you call SessionService.Create to create a session the SessionGuid returned by this call will be saved in the process. Then, all further commands will be sent with this SessionGuid... in the documentation this will be considered the "logged in" user when executing commands. For example...

    EQProcess _eq = new EQProcess(yourAccessKey, yourSecretKey);
    
    _eq.SessionService.Create(yourUsername, yourPassword,
        (Session session, EQException ex) => // onComplete
        {
            if (ex == null)
            {
                _eq.UserService.ListCollections(ListCollectionsContext, PagingParameters,
                    (List collections, bool hasMore, EQException ex) => // onComplete
                    {
                        // do something with the collections returned
                    }
                );
            }
            else
            {
                HandleException("SessionService.Create", ex);
            }
        }
    );

In this example after the SessionService.Create command has completeted, a UserService.ListCollections command will be executed for that logged in user.

All of the commands have been grouped together into services... these services are as follows:

• SessionService • UserService • CollectionService • ContentFileService
• PostService • UploadService • InvitationService • RequestService
• MiscService

As the clients evolved terminology diverged from the backend database (or sometimes, the backend is a little more generic). Here is a list of equivalent objects in the system.

Backend Client
User Account
Collection Channel
ContentFile Video
Post Comment

Users own (or follow, or contribute to) Collections. Collections have ContentFiles. ContentFiles have Posts. Posts have Posts (but only one level deep).

Errors
The synchronous, or blocking, functions will throw an exception if an error occurs. The asynchronous, or non-blocking, functions return an EQException parameter to the "onComplete" action block. If the EQException parameter is not null, then an error has occurred.

Installation

You will need to download the EQNetwork.dll eqnetwork.zip and reference this from within your application. You will also need to download and install the PostSharp.dll (http://www.postsharp.net/download)

The souce code for the SDK and an example project can be downloaded at eqnetwork-csharp-source.zip.


top
SessionService
Most commands in the system require a SessionGuid. This is a string that is created using SessionService.Create with the users login and password. The SessionGuid essentially identifies the User that is executing the command. The SessionGuid will be sent automatically with all commands after the SessionService.Create command has been executed. Sessions do eventually expire.

Session SessionService.Create(string username, string password);
Create a new SessionGuid (and return some additional system info.) This is effectively the login for the EQ Network SDK.

username is the unique user (or account) name.
password is the users case sensitive password.

Returns a Session object (which includes a
User object):

    public class Session
    {
        public User User { get; set; }
        
        public Guid? SessionGuid { get; set; }
        public string ExpiredVersion { get; set; }
        public int? InvitationCount { get; set; }
        public int? NotificationCount { get; set; }
        public int? RequestCount { get; set; }
        public List<int> Following { get; set; }
        public List<int> FollowingUser { get; set; }
        public int? MyCollectionCount { get; set; }
        public long? MyStorage { get; set; }
    }
        
The User node contains all of the User attributes.
SessionGuid is the value generated that you will use for all commands associated with this user.
ExpiredVersion, InvitationCount, NotificationCount, RequestCount, Following and Following User are all misc. pieces of system information that are useful to have available when the user logs in (and creates a session.)

Session SessionService.Check(Guid sessionGuid);
Check that a session is still valid. And also a quick way to retrieve updated values for InvitationCount, NotificationCount and RequestCount.

sessionGuid identifies the session to check.

Returns a partially filled in Session object with InvitationCount, NotificationCount and RequestCount. These are the number of invitations, the number of notifications, and the number requests that have been made to this user.

Note: If the session has expired an error would be returned.

TODO: Return everything a Session_Create does


top
UserService
Users (or accounts) are the primary entity in the EQ Network environment. The following are the major User functions:

Get will retrieve a User node with user attributes. Create allows a user to be created (will send a confirmation email). Update allows user attributes to be changed. UploadIcon allows the users avatar to be uploaded. DeleteIcon allows the users avatar to be deleted. Delete will delete a user. ListCollections will list a users collections. Search will search users. ListUsers will list a users relationships with other users. AddRelationship will create a relationship between two users. ListFavoritedContentFiles will list content files that have been favorited. EmailAccounts will email a list of Accounts (used by Forgot Username). RequestPasswordReset will email a link for password reset (used by Forgot Password). ResetPassword() a command that will reset the password (uses emailed reset guid). ResendConfirmationEmail resends the User Create confirmation email. LinkFacebook will link the EQ Network account to a Facebook account. UnlinkFacebook will unlink the EQ Network account from a Facebook account. LinkTwitter will link the EQ Network account to a Twitter account. UnlinkTwitter will unlink the EQ Network account from a Twitter account. FacebookFindFriends find Facebook friends (prioritizes Facebook friends who are also on EQ Network). TwitterFindFriends find Twitter followers (prioritizes Twitter followers who are also on EQ Network). UpdateSocial will update the social settings. SocialAdd will add a social event (e.g. watched video). SocialRemove will remove a social event. Purchase record a purchase for the logged in user.

User Object
In many responses you may get one (or a list of) User objects. A User object is a mix of user attributes and computed user values.

    public class User
    {
        // fields that can be set on the backend by the SDK 
        public string Username { get; set; }
        public string Password { get; set; }
        public string Company { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Email { get; set; }
        public DateTime? DateOfBirth { get; set; }
        public string Gender { get; set; }
        public string Phone { get; set; }
        public string Carrier { get; set; }
        
        // social info
        public bool? IsSocialOn { get; set; }
        public long? FbBits { get; set; }
        public long? TwitterBits { get; set; }
        
        // facebook
        public bool? FbIsLinked { get; private set; }
        public string FacebookId { get; private set; }
        public string FbAccessToken { get; private set; }
        public DateTime FbExpirationDate { get; private set; }
        
        // twitter
        public bool? TwitterIsLinked { get; private set; }
        public string TwitterUserId { get; private set; }
        public string TwitterScreenName { get; private set; }
        public string TwitterOAuthToken { get; private set; }
        public string TwitterOAuthTokenSecret { get; private set; }
        
        public FileUploadSpec Icon { private get; set; } // only one way serialization
        
        // not writeable, but returned as computed fields
        public int? UserId { get; private set; }
        public bool? Active { get; private set; }
        public DateTime? Created { get; private set; }
        public DateTime? Modified { get; private set; }
        public int? UserTypeId { get; private set; }
        public string IconFilename { get; private set; }
        public bool? Verified { get; private set; }
        public Guid? ConfirmationGuid { get; private set; }
        public string AgreementAccepted { get; private set; }
        public DateTime? CreatedOn { get; private set; }
        public int? MembershipTypeId { get; private set; }
        public DateTime? MembershipExpiration { get; private set; }
        public long MembershipStorageLevelExpires { get; private set; }
        public long MembershipStorageLevel { get; private set; }
        public long MembershipStorageUsed { get; private set; }
        public DateTime? LastNotificationEmail { get; private set; }
        public DateTime? CurrentNotificationEmail { get; private set; }
        public long? MembershipStorageLevelEarned { get; private set; }
        
        // helper enum conversion
        public Db.UserType UserType { get { return (UserTypeId == null) ? Db.UserType.Unknown : (Db.UserType)UserTypeId; } set { UserTypeId = (int)value; } }
        public Db.MembershipType MembershipType { get { return (MembershipTypeId == null) ? Db.MembershipType.Unknown : (Db.MembershipType)MembershipTypeId; } set { MembershipTypeId = (int)value; } }
        
        // calculated results from the backend
        public int? UnviewedCount { get; private set; }
        public bool? FollowedBy { get; private set; }
        public bool? Blocked { get; private set; }
        public bool? Following { get; private set; }
        public int? Followers { get; private set; }
        public int? ChannelFollowers { get; private set; }
        public string UserTitle { get; private set; }
    }
        
UnviewedCount is sum of the Collections UnviewedCount being followed by this user.
UserTitle is a calculated value and will be Company, if it exists, or UserName. Use this value to display the user as in the future we may change how a user is displayed on the backend, and then this would propogate to all the clients.
UserId is a unique identifier of a User.
Active is True if the user is active, or false if the user has been deleted (but not yet scrubbed from the database.)
Created is the date and time the User record was created.
Modified is the date and time the User record was last modified.
UserName, Company, FirstName, LastName, Email, DateOfBirth, Gender, Phone and Carrier are all basic attributes of the user.
UserTypeId currently there is only one type of user (1: Normal).
IconFilename this is the filename of the users icon. See
User Icon Url for more information on how to retrieve this image.)
Verified indicates if the user has been verified by their confirmation email.
ConfirmationGuid used to match a confirmation email with a user.
AgreementAccepted is the version level of the agreement the user has accepted.

User UserService.Get(int UserId);
User UserService.Get(string username);
User UserService.Get();
Get a User object. If the User object retrieved is not for the logged in User not all information will be filled in for privacy reasons. The version with no parameter retrieves the object for the currently logged in User.

Username is the Username of the User to be retrieved.
UserId is the UserId of the User to be retrieved.

Response is the User object of the requested User (see
User Object).

Session UserService.Create(ref User user);
Create a new user, the User object must have the following fields and the object will be updated with computed fields when the function is complete. This will also send a confirmation email if successfull.

UserName is the unique user (or account) name.
Password is the users case sensitive password.
FirstName, LastName and Email are all required fields.
Company, if it exists, will be used instead of UserName for the users display name.
DateOfBirth and Gender are required fields.
Phone and Carrier are optional.
Icon is optional. It is the Users account icon. This is a local file that will be uploaded as part of the multipart form data.
CreatedOn specifieds the environment that the user account was created on. (e.g. iOS, Web, etc...)

You will also be returned a session object. With this you are essentially already logged in.

void UserService.Update(ref User user);
Only fields that have been set in the User object will be sent to the Backend for the update. This will send a confirmation email if the email address has changed.

void UserService.UploadIcon(string path);
void UserService.UploadIcon(FileUploadSpec fileUploadSpec);
void UserService.DeleteIcon()
You can update (for the currently logged in user) the User icon (avatar) in the Create or Update functions... or, you can update it independantly with one of these function.

void UserService.DeleteUser();
This will delete the currently logged in user.

List Collections associated with a User. Pagination is supported. Search criteria is supported.

    public class ListCollectionsContext
    {
        public enum SortOrder
        {
            Alpha, Recent, Popularity, Comments,
        };
        
        public SearchFilters SearchFilters { get; set; }
        public bool? IncludeEmpty { get; set; }
        public bool? includeUsers { get; set; }
        public bool? NotificationCountInSort { private get; set; }
        public List<Db.User_CollectionType> User_CollectionTypes { get; set; }
    }
SortOrder an enum of the valid strings that can be used in the PagingParameters SearchFilters these are standard search parameters used in several search commands in EQ Network. (see
SearchFilters)
IncludeEmpty will include Collections that have no ContentFiles
includeUsers when true the search results will include Collection objects that represent matching Users.
NotificationCountInSort will cause Collections to be first sorted by NotificationCount (currently used in the Watch section)
User_CollectionTypes if specified will limit the results to the Collections of the specified type of relationship (owner, follower, and/or contributor)
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see PagingParameters)

Response is a List of Collection objects (see Collection Object)

Search Users. Pagination is supported.

Search is the search term to use.
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see
PagingParameters)

Response is a List of User objects. (see User Object)

List Users associated with a User. Pagination is supported. Search criteria is supported.

    public class ListUsersContext
    {
        public enum SortOrder
        {
            Alpha, Recent,
        };
        
        public SearchFilters SearchFilters { get; set; }
        public bool? Following { get; set; }
        public bool? Blocked { get; set; }
        public bool? IncludeChannelFollowers { get; set; }
        public bool? ShowInverse { get; set; }
        public int? UserId { get; set; }
        }
    }
SortOrder an enum of the valid strings that can be used in the PagingParameters SearchFilters these are standard search parameters used in several search commands in EQ Network. (see
SearchFilters)
Following only include users that are following
ShowInverse will show, for example, who is following a user instead of who a user is following.
Blocked only include users that are blocked
IncludeChannelFollowers only include users that are following the logged in user
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see PagingParameters)

Response is a List of User objects. (see User Object)

Add a Relationship from the logged in user to another user (for now Adds a following relationship or blocks a user).

    public class AddUserRelationshipContext
    {
        public int? Other_UserId { get; set; }
        public bool? Following { get; set; }
        public bool? Blocked { get; set; }
    }
Other_UserId is the user who the relationship is with.
Following if set to 'Y' will follow the other user. If set to 'N' will "unfollow" the other user.
Block if set to 'Y' will block the other user. If set to 'N' will "unblock" the other user.

List UserService.ListFavoritedContentFiles(
        ListContentFilesContext listContentFilesContext,
        PagingParameters pagingParameters);
List the ContentFiles that have been favorited by the logged in user.

ListContentFilesContext contains parameters that are primarily used to filter the returned list.
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see
PagingParameters)

Response is a List of ContentFile objects (see ContentFile Object)

void UserService.EmailAccounts(string email);
Email a list of usernames associated with an email address *to* that email address (used for Forgot Username).

Email is the email address associated with the User(s)

void UserService.RequestPasswordReset(string username);
Sends an Email to the specified User with a Password Reset link. The email is sent to the email address associated with the User.

Username is the username of the User that wishes a password reset.

void UserService.ResetPassword(Guid passwordResetGuid, string password);
Using the PasswordResetGuid sent in the RequestPasswordReset email... change the password.

PasswordResetGuid is the PasswordResetGuid sent in the RequestPasswordReset email.
Password is the new password.

void UserService.ResendConfirmationEmail();
Resends the confirmation email to the currently logged in user (first sent when User was created).

User UserService.LinkFacebook(string accessToken, DateTime expirationDate);
Link logged in User to a Facebook account.

AccessToken and ExpirationDate are provided by the Facebook API and identifies the Facebook user.

Response is an updated User object (see
User Object).

User UserService.UnlinkFacebook();
Unlink logged in User from Facebook.

Response is an updated User object (see
User Object).

User UserService.LinkTwitter(string twitterUserId, string screenName,
        string oAuthToken, string oAuthTokenSecret);
Link logged in User to a Twitter account.

TwitterUserId, ScreenName, OAuthToken and OAuthTokenSecret are provided by the Twitter API and identify the Twitter user.

Response is an updated User object (see
User Object).

User UserService.UnlinkTwitter();
Unlink logged in User from Twitter.

Response is an updated User object (see
User Object).

List UserService.FacebookFindFriends(
        string search, Db.SocialSearchType socialSearchType,
        PagingParameters pagingParameters);
List the Facebook friends whose name matches the search string.

Search is the search term to use.
SocialSearchType wether to search for EQ Network members or not. (see
SocialSearchType)
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see PagingParameters)

Response is a List of Friend objects (see Friend Object)

List UserService.TwitterFindFriends(
        string search, Db.SocialSearchType socialSearchType,
        PagingParameters pagingParameters);
List the Twitter followers whose name matches the search string.

Search is the search term to use.
SocialSearchType wether to search for EQ Network members or not. (see
SocialSearchType)
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see PagingParameters)

Response is a List of Friend objects (see Friend Object)

User UserService.UpdateSocial(bool isSocialOn, int fbBits, int twitterBits);
Update the currently logged in users social information. Primarily if and what is shared to social networks.

isSocialOn indicates if sharing of actions to social networks is on or off.
FbBits the active social settings for Facebook (see
SocialBits)
TwitterBits the active social settings for Twitter (see SocialBits)

Response is an updated User object (see User Object).

void UserService.SocialAdd(string action, int? collectionId, int? contentFileId, bool force);
Create an Action that may be shared with social networks. If an action is forced it will be shared with the social networks regardless of social settings. For example a user may normally wish to not share movie watching activity... but on a specific video click a button to indicate that in this case share the action.

Action the action to share. ("watch", "upload", "comment", "share", "follow", "create", "like", "favorite")
CollectionId the id of the Collection that the action was acted upon
ContentFileId the id of the ContentFile that the action was acted upon
Force indicates if the action is to be forced through regardless of social settings

void UserService.SocialRemove(string action, int? collectionId, int? contentFileId, bool force);
Remove a previously created Action from social networks.

Action, CollectionId, ContentFileId and Force must match the previously created action.

PurchaseTransaction UserService.Purchase(PurchaseContext purchaseContext);
Executes a purchase transaction. The receipt data (which would have been provided by the payment provider) will be verified by the payment provider. If the purchase is verified a list of products purchased will be returned. Currently there is one product available for purchase: "Pro Access 15G 1 Year Subscription for $69.99", product code: "ProAccess_15G_1YR".

If the purchase is verified all user information related to the purchase is updated (e.g. additional storage).

    public class PurchaseContext
    {
        public enum PaymentTypeNames
        {
            AlreadyOwn, Apple, Simulator, PayPal,
        }
    
        public string ProductCode { get; set; }
        public string UUID { get; set; }
        public string PaymentType { private get; set; }
        
        public string ReceiptData { private get; set; }
        public float Price { private get; set; }
        public string PriceLocale { private get; set; }
        public string CurrencyCode { private get; set; }
        public string CountryCode { private get; set; }
        public bool? IsSandbox { private get; set; }
    }            
PaymentTypeNames are the valid strings for PaymentType
ProductCode is the product code. (ProAccess_15G_1YR)
UUID is a unique device identifier (optional)
PaymentType is the payment provider (AlreadyOwn is used to revalidate a receipt)
ReceiptData is the receipt data from the payment provider
Price is the purchase price
PriceLocale is the price locale
CurrencyCode is the currency code
CountryCode is the country code
IsSandbox indicates if this transaction is utilizing the payment providers sandbox mode
            
    public class PurchaseTransaction
    {
        public int? PurchaseTransactionId { get; private set; }
        public List<Product> Products { get; private set; }
    }    
PurchaseTransactionId is the id of the completed transaction
Products is a list of Products purchased (see
Product Object)

PurchaseContext is the information about the purchase

Response is a list of Product objects.


top
CollectionService
Collections (or channels) are essentially folders that ContentFiles can be stored in. They are currently *not* nested. The following are the major Collection functions.

Get will retrieve a Collection object with collection attributes. Create allows a collection to be created. Update allows collection attributes to be changed. UploadIcon allows the collections icon to be uploaded. DeleteIcon allows the collections icon to be deleted. Delete will delete a collection. ListContentFiles will list a collections ContentFiles. AddRelationship will delete a collection. SocialAdd will add a social event (e.g. created collection). SocialRemove will remove a social collection event. MarkAsViewed will mark the collection as viewed.

Collection Object
In responses you may get one (or a list of) Collection objects. A Collection object is a mix of collection attributes and calculated collection values. It will look like this:

    public class Collection
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public Db.CollectionType CollectionType { get; set; }
        public string IconFilename { get; set; }
        public List<string> CategoryList { get; set; }
        public FileUploadSpec Icon { private get; set; }
        
        // computed fields
        public int? CollectionId { get; private set; }
        public bool? Active { get; private set; }
        public DateTime? Created { get; private set; }
        public DateTime? Modified { get; private set; }
        public float SortBy { get; set; }
        
        public int User_CollectionTypeId { get; set; }
        
        public int FollowersCollection { get; set; }
        public int FollowersUser { get; set; }
        
        public int OwnerUserId { get; set; }
        public string OwnerUserIconFilename { get; set; }
        public string OwnerUserTitle { get; set; }
        
        public int ContentFileCount { get; set; }
        public int UnviewedCount { get; set; }
        public DateTime MostRecent { get; set; }
        public int NotificationCount { get; set; }
        public int ViewCount { get; set; }
        public int SortTypeId { get; set; }
        public int NumberOfComments { get; set; }
    }
Name is the name of the collection
Description is the description of the collection.
CollectionType is the collection type (1: Normal, 2:Private)
IconFilename this is the filename of the collections icon. See Collection Icon Url for more information on how to retrieve this image.)
Categories is a list of Categories (e.g. Sports, Golf)
Icon is used to include an upload of the icon in the Create command
CollectionId is a unique identifier for the collection.
Active is True if the collection is active, or false if the collection has been deleted (but not yet scrubbed from the database.)
Created is the date and time the Collection record was created.
Modified is the date and time the Collection record was last modified.
SortBy a custom sorting sequence for a list of Collections (not implemented).
User_CollectionTypeId defines the relationship between the user and the collection (1: Owner, 2: Follower, 3:Contributor). OwnerUserId is the UserId this collection belongs to.
OwnerUserIconFilename is the IconFilename of the user this collection belongs to.
OwnerUserTitle is the UserTitle of the user this collection belongs to.
ContentFileCount is the number of ContentFiles in this Collection.
UnviewedCount is the number of ContentFiles that have not been viewed.
MostRecent is the date/time of when the Collection was last viewed.
NotificationCount is the number of ContentFiles that have been added since this Collection was last viewed.
ViewCount is a count of how many times movies inside the collection have been viewed.
NumberOfComments is a count of all the comments in this collection.

Note: A Collection can have only one Owner. A Collection can have multiple Followers and/or Contributors. A Follower will receive notifications about changes in a Collection and the Collection will appear in the Followers Watch list. A Contributor is like a Follower, but additionally can add ContentFiles to this Collection.

Collection CollectionService.Get(int collectionId);
Collection CollectionService.Get(Guid collectionGuid);
Get a Collection object. If the collection is private, then the user must be the owner of, a contributor to, or a follower of, the collection.

CollectionId is the Id of the Collection object.
CollectionGuid is the unique Guid of the Collection object.

Response is a Collection object (see
Collection Object)

void CollectionService.Create(ref Collection collection);
Create a new collection, the Collectin object must have the following fields and the object will be updated with computed fields when the function is complete. The Collections "owner" will be the currently logged in user.

Name is the name of the collection.
Description is the description of the collection.
Categories is a comma delimited list of categories (see
Categories).
Private indicates that the collection is not visible in Search results, etc...
Icon is optional. It is the Collections icon. This is a local file that will be uploaded as part of the multipart form data. If an icon is not uploaded a default icon will be chosen based on one of the Categories.

Response is an updated Collection object (see Collection Object)

void CollectionService.Update(ref Collection collection);
Update a Collection.

Response is an updated Collection object (see
Collection Object)

void CollectionService.UploadIcon(int collectionId, string path);
void CollectionService.UploadIcon(int collectionId, FileUploadSpec fileUploadSpec);
void CollectionService.DeleteIcon(int collectionId)
You can update Collection icon in the Create or Update functions... or, you can update it independantly with one of these functions.

The action taken with this command depends on the relation between the currently logged in user and the Collection. If the User is the owner of this collection, then the collection will be deleted. If the User is a follower of, or contributor to, this collection... then this relationship will be deleted.

List the ContentFiles that belong to a collection. Pagination is supported. Search criteria is supported.

    
    public class ListContentFilesContext
    {
        public enum SortByStrings
        {
            Alpha, Recent, Popularity, Comments,
        };
        
        public enum ColumnSetStrings
        {
            Normal, Lean,
        };
        
        public SearchFilters SearchFilters { get; set; }
        public bool SearchMatchOnly { get; set; }
        public int? Current_ContentFileId { get; set; }
        public int? GetNext_Offset { get; set; }
        public string ColumnSet { get; set; }
    }
SortByStrings an enum of the valid strings that can be used in the PagingParameters
SearchFilters these are standard search parameters used in several search commands in EQ Network. (see
SearchFilters)
SearchMatchOnly if this is true only return matched ContentFiles... if false then return all ContentFiles, but matched ones first.
Current_ContentFileId the ContentFileId to begin listing.
GetNext_Offset the offset *from* the Current_ContentFileId to begin listing.
ColumnSet if Lean is specified only the bare bones information for each ContentFile will be included (for performance)
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see PagingParameters)

Current_ContentFileId and GetNext_Offset are used together to get ContentFiles *after* a given ContentFile within a Collection. Currently this is used to play the *next* movie.

Response is a List of ContentFile objects (see ContentFile Object)

This will add a "Following", or a "Contributor" relationship between the currently logged in user and a Collection.

CollectionId is the unique identifier of the Collection.
User_CollectionTypeId defines the relationship being added between the user and the collection (e.g. follower or contributor).

Note: To remove this relationship, call CollectionService.Delete.

Create an Action on a Collection that may be shared with social networks. If an action is forced it will be shared with the social networks regardless of social settings. For example a user may normally wish to not share collection following activity... but on a specific collection click a button to indicate that in this case share the action.

CollectionId the id of the Collection that the action was acted upon
Action the action to share. ("share", "follow", "create", "like")
Exclude a specific SocialService to exclude from this action. Force indicates if the action is to be forced through regardless of social settings

void CollectionService.SocialRemove(int collectionId, string action, bool force);
Remove a previously created Collection Action from social networks.

CollectionId, Action and Force must match the previously created action.

void CollectionService.MarkAsViewed(int collectionId);
Marks a Collection as viewed... this is used for statistical and notification purposes.

CollectionId is the Id of the Collection to mark as viewed.


top
ContentFileService
ContentFiles are the movies that have been uploaded into a Collection (or Channel). The following are the major ContentFile functions. (for additional ContentFile functions see ContentFiles (other).)

Get will retrieve a ContentFile object. Create will upload and create a content file. CreateFromUrl will create a content file from a url provided. Update allows content file attributes to be changed. UpdateSortBy updates the SortBy property independantly. ChangeCollection updates which Collection owns the ContentFile. FlagAsInappropriate will flag this ContentFile as inappropriate. Delete will delete a content file. ListPosts will list a content files posts (or comments). SocialAdd will add a social event (e.g. created a content file). SocialRemove will remove a social content file event. MarkAsViewed will mark the content file as viewed.

ContentFile Object
    public class ContentFile
    {
        public int CollectionId { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        
        public string VideoFilename { get; set; }
        public string ThumbnailFilename { get; set; }
        public List<string> CategoryList { get; set; }
        public FileUploadSpec Video { private get; set; } // only one way serialization
        public FileUploadSpec ThumbnailFile { private get; set; } // only one way serialization
        
        public int? ContentFileId { get; private set; }
        public bool? Active { get; private set; }
        public DateTime? Created { get; private set; }
        public DateTime? Modified { get; private set; }
        public float? SortBy { get; set; }
        public string MuxKey { get; set; }
        
        public int? UserId { get; set; }
        public string Keywords { get; set; }
        public int? ContentFileTypeId { get; set; }
        public int? DeliveryRequestId { get; set; }
        public string JdiResult { get; set; }
        public bool? IsAdult { get; set; }
        public int? ViewCount { get; set; }
        public string OriginalUrl { get; set; }
        public long? OriginalFilesize { get; set; }
        public string DownloadUrl { get; set; }
        public int? Width { get; set; }
        public int? Height { get; set; }
        public float? Duration { get; set; }
        public string Thumbnail { get; set; }
        public bool? IsFlashVideo { get; set; }
        public string Filename { get; set; }
        public string CurrentMuxKey { get; set; }
    }
    
ContentFileId is a unique identifier for the content file.
Active is True if the content file is active, or false if the content file has been deleted (but not yet scrubbed from the database.)
Created is the date and time the ContentFile record was created.
Modified is the date and time the ContentFile record was last modified.
UserId is the unique identifier of the user this content file belongs to.
Name is the name of the content file
Description is the description of the content file.
Keywords are the keywords for this content file.
ContentFileTypeId is the content file type (1: Movie)
Filename is the filename of the content file. (this can uniquely identify the ContentFile, without providing a sequential index, for example in sharing.
DeliveryRequestId, JdiResult and MuxKey contains information about the downloading and/or processing of the video. (see DeliveryRequestId's and MuxKey's for more information).
IsAdult a flag that is True if an adult category was chosen for this content file (or containing collection).
Categories is a comma delimited list of Categories (e.g. Sports, Golf).
ViewCount is the number of times this content file has been viewed.
OriginalUrl is the url of where this files was downloaded from (if it was downloaded).
OriginalFilesize is the size of the original file.
DownloadUrl this may be different from the OriginalUrl if the movie was inside a page pointed to by OriginalUrl.
CollectionId the Collection this ContentFile belongs to.
UserViewCount the number of times this ContentFile has been viewed by the user making this request. (SessionGuid)
NumberOfComments the number of posts (and sub-posts) that have been made on this ContentFile.
SearchMatched indicates if this ContentFile matched a filter set (you still get the ContentFile... just, typically, ordered by Filter matches first).
CurrentTime in the case of a movie, this shows the time offset in the movie the user last viewed.

Note: A ContentFile can belong to only one collection.

Get a Collection object.

ContentFileId is the Id of the ContentFile to be retrieved.
Filename is as system generated unique filename for the ContentFile.

Response is the ContentFile object of the requested ContentFile (see
ContentFile Object).

void ContentFileService.Create(ref ContentFile contentFile);
void ContentFileService.CreateFromUrl(ref ContentFile contentFile, string url);
Create a new content file.

CollectionId is the Collection this ContentFile is being added to.
Name is the name of the content file.
Description is the description of the content file.
Keywords are the keywords for this content file.
Categories is a comma delimited list of categories (see
Categories).
Video is a local file that will be uploaded as part of the multipart form data.
Url is an http link to either a file, or a page containing a flash movie.
IsFlashVideo is a flag indicating which type of Url it is (file or page containing flash).

Response is an updated ContentFile object (see ContentFile Object)

Note: MuxKey contains information about the downloading and/or processing of the video. (see DeliveryRequestId's and MuxKey's for more information).

Update a ContentFile.

Response is an updated ContentFile object (see
ContentFile Object)

ContentFile ContentFileService.UpdateSortBy(int contentFileId, float? sortBy);
Update a ContentFile's SortBy value.

Response is an updated ContentFile object (see
ContentFile Object)

void ContentFileService.ChangeCollection(int contentFileId, int old_CollectionId, int new_CollectionId);
Change the Collection that a ContentFile belongs to.

ContentFileId is the ContentFile to change.
Old_CollectionId is the Collection that the ContentFile originally belongs to.
New_CollectionId is the new Collection that the ContentFile will belong to.

void ContentFileService.FlagAsInappropriate(int contentFileId);
This will cause a notification to be sent to EQ Network staff.

ContentFileId is the Id of the ContentFile.

void ContentFileService.Delete(ContentFile contentFile);
void ContentFileService.Delete(int contentFileId);
The action taken with this command depends on the relation between the currently logged in user and the Collection. If the User is the owner of this content file, then the content file will be deleted. If the User is a follower of this content file... then this relationship will be deleted.

List ContentFileService.ListPosts(string filename, PagingParameters pagingParameters);
List Posts associated with a ContentFile. Pagination is supported.

Filename identifies the ContentFile to list posts for.
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see
PagingParameters)

Response is an list of Post objects (see Post Object.)
In a post, Level is the depth of the post. There are two levels of depth. A depth of one for comments on the content file. And a depth of two for comments on a comment.

void ContentFileService.SocialAdd(int contentFileId, Db.SocialService? exclude, string action, bool force);
Create an Action on a ContentFile that may be shared with social networks. If an action is forced it will be shared with the social networks regardless of social settings. For example a user may normally wish to not share content file viewing activity... but on a specific instance click a button to indicate that in this case share the action.

ContentFileId the id of the ContentFile that the action was acted upon
Action the action to share. ("share", "follow", "create", "like")
Exclude a specific SocialService to exclude from this action. Force indicates if the action is to be forced through regardless of social settings

void ContentFileService.SocialRemove(int contentFileId, string action, bool force);
Remove a previously created ContentFile Action from social networks.

ContentFileId, Action and Force must match the previously created action.

void ContentFileService.MarkAsViewed(int contentFileId);
Marks a ContentFile as viewed... this is used for statistical and notification purposes.

ContentFileId is the Id of the ContentFile to mark as viewed.


top
PostService
Posts are the comments that have been made to content files.

Get will retrieve a post. Create will create a post. Update will update a post. Delete will delete a post.

Post Object
    public class Post
    {
        public string Title { get; set; }
        public string Message { get; set; }
        
        public int? CommentOn_PostId { get; set; }
        public int? CommentOn_UserId { get; set; }
        public int? CommentOn_ContentFileId { get; set; }
        
        public Db.PostType PostType { get; set; }
        
        public int? PostId { get; private set; }
        public bool? Active { get; private set; }
        public DateTime? Created { get; private set; }
        public DateTime? Modified { get; private set; }
        
        public int UserId { get; set; }
        public int Child_PostId { get; set; }
        
        public string UserName { get; set; }
        public string UserTitle { get; set; }
        
        public int Level { get; set; }
    }
Level is the depth of the post. There are two levels of depth. A depth of one for comments on the content file. And a depth of two for comments on a comment.
UserTitle is a calculated value and will be Company, if it exists, or UserName. Use this value
UserName is the UserName of the User who made this post
PostId is a unique identifier for the post.
Child_PostId the post unique identifier that this is a reply to.
UserId is the unique identifier of the user who made this post.
Title is the title of a comment (not currently used).
Message this is the body of the post. Created is the date and time the Post record was created.

Post PostService.Get(int postId);
Get a Post object.

PostId is the Id of the Post to be retrieved.

Response is the Post object of the requested post (see
Post Object).

void PostService.Create(ref Post post);
Create a new post.

Title is the title of a comment (not currently used).
Message this is the body of the post. Created is the date and time the Post record was created.
CommentOn_ContentFileId the content file that this post is a comment on.
CommentOn_PostId the post that this post is a comment on.

Response is an updated Post object (see
Post Object)

void PostService.Update(ref Post post);
Update a Post.

Response is an updated Post object (see
Post Object)

void PostService.Delete(Post post);
void PostService.Delete(int postId);
Deletes a post.


top
UploadService
Uploads can be started, paused, cancelled and continued. For reliable uploads EQ Network has implemented a chunked upload strategy. The control of which chunks remain to be uploaded, their offsets and size, are determined and managed by the backend. The client will request a list of chunks to upload from the backend and then upload them.

The C# SDK contains an
Upload Controller which wraps all of the upload functionality into one object. The controller is preferred over using the individual methods documented here. This controller handles the upload of multiple files as well as pausing and prioritizing uploads.
(see Upload Controller)

Begin starts the upload. Complete indicates that the upload is complete. CreateContentFile creates a ContentFile from a completed upload. ListUpload list the chunks required by the backend. ListUploads list the chunks required by the backend for all uploads. UploadChunk upload a chunk. CancelUpload cancels an upload.

Upload Object
Upload UploadService.Begin(UploadContext uploadContext);
Start the upload.

Upload UploadService.Complete(UploadContext uploadContext);
Indicates that the Upload is complete.

Upload UploadService.ListUpload(UploadContext uploadContext);
Create a ContentFile from a completed upload.

List UploadService.ListUploads(int preferredChunkSize, int numberOfChunks);
List the next batch of chunks required by the backend.

long UploadService.UploadChunk(out long total, UploadContext uploadContext,
        long chunkOffset, long chunkSize, FileUploadSpec chunk);
List the next batch of chunks required by the backend for all uploads for the currently logged in user.

Upload UploadService.CancelUpload(UploadContext uploadContext);
Upload a chunk. Retries are handled by the backend and chunks may be re-requested.

void UploadService.CreateContentFile(ref ContentFile contentFile, UploadContext uploadContext);
Cancel an upload

Upload Controller
The Upload Controller wraps all of the upload functionality into one object. The controller is preferred over using the individual methods. This controller handles the upload of multiple files as well as pausing and prioritizing uploads.

Example code for using the Upload Controller:

    public void Upload_Controller_Test()
    {
        ContentFile contentFile = new ContentFile();
        contentFile.Name = "SmallOne";
        contentFile.CategoryList = new List<string>() { "Sports", "Music" };
        contentFile.CollectionId = 262;
        
        DateTime start = DateTime.Now;
        
        Upload_Controller upload_Controller = new Upload_Controller(_eq);
        upload_Controller.Start(contentFile.Name, @"c:\projects\SmallOne.mp4",
            (UploadContext uploadContext, UploadContext.UploadState uploadState) => // onStateChange
            {
                if (uploadState == UploadContext.UploadState.CREATE_CONTENTFILE)
                {
                    uploadContext.ContentFile = contentFile;
                }
                if (uploadState == UploadContext.UploadState.FINISHED)
                {
                    upload_Controller.Cancel();
                    _message = "success";
                }
            },
            (EQException ex) => // onError
            {
                _message = ex.Message;
            }
        );
    }
Note: You can "Start" more than one upload at a time. The controller will remain active until Upload_Controller.Cancel is called.


top
InvitationService
Invitations can be sent to email address or other EQ Network users. An Invitation can be an invitation to follow or contribute to a Collection. Invitations are the only way that followers can exist on a private channel. An Invitation can also be an invitation to follow the currently logged in user.

Accept an invitation. Confirm an invitation. Create an invitation. Update an invitation. Decline an invitation. Delete an invitation. ListInvitationsForCollection will list all invitations for a collection. ListInvitationsForUser will list all invitations for a user. ListInvitationsToMe will list all invitations to the currently logged in user. Resend an invitation.

InvitationContext Object
        public class InvitationContext
        {
        int? collectionId;
        int? user_CollectionTypeId;
        int? other_UserId;
        bool? user_UserFollowing;
        
        string emails;
        string message;
        
        string sendTo_FacebookIds;
        string sendTo_TwitterIds;
        string sendTo_UserIds;
        string sendTo_SmsPhones;
        
        bool? sentClientSide;
        
        string data;
        }
    
void Accept(Guid InvitationGuid);
Used by an Invitation recipient to accept an invitation.

void Confirm(Guid InvitationGuid);
Used by an Invitation recipient to confirm an invitation.

InvitationMessage Create(InvitationContext InvitationContext);
Create an invitation. This will email the recipient.

InvitationMessage Update(InvitationContext InvitationContext);
Update an invitation.

void Decline(Guid InvitationGuid);
Decline an invitation.

void Delete(Guid InvitationGuid);
Delete an invitation.

List ListInvitationsForCollection(int collectionId);
List all the invitations that have been sent for a given collection.

List ListInvitationsForUser(int userId);
List all the invitations that have been sent to follow a given user.

List ListInvitationsToMe(List invitationTypes, bool? all);
List all of the invitations that have been sent to the email address of the currently logged in user.

void Resend(Guid InvitationGuid);
Resend an invitation.


top
RequestService
A Request can be a request to follow or contribute to a Collection. A Request can also be a request to follow a user.

Accept a request. Confirm a request. Create a request. Update a request. Decline a request. Delete a request. ListRequestsForCollection will list all Requests for a collection. ListRequestsForUser will list all requests for a user. ListRequestsToMe will list all requests to the currently logged in user. Resend a request.

RequestContext Object
    public class RequestContext
    {
        public int? UserId { get; set; }
        public string Domain { get; set; }
        public int? CollectionId { get; set; }
        
        public Guid? CollectionGuid { get; set; }
        public Guid? CollectionRequestGuid { get; set; }
        public Db.User_CollectionType? User_CollectionType { get; set; }
        public bool? User_UserFollowing { get; set; }
        public string Message { get; set; }
    }
void Accept(Guid RequestGuid);
Used by a Request recipient to accept a request.

void Confirm(Guid RequestGuid);
Used by a Request recipient to confirm a request.

RequestMessage Create(RequestContext RequestContext);
Create a request. This will email the recipient.

RequestMessage Update(RequestContext RequestContext);
Update a request.

void Decline(Guid RequestGuid);
Decline a request.

void Delete(Guid RequestGuid);
Delete a request.

List ListRequestsForCollection(int collectionId);
List all the requests that have been sent for a given collection.

List ListRequestsForUser(int userId);
List all the requests that have been sent to follow a given user.

List ListRequestsToMe(List requestTypes, bool? all);
List all of the requests that have been sent to the email address of the currently logged in user.

void Resend(Guid RequestGuid);
Resend a request.


top
MiscService
void Activity_Create(string activity, string secondary); List ContentMenu_List(ref DateTime? modifiedSince); List Hashtag_Trending(PagingParameters pagingParameters);

Hashtags
Hashtags are extracted from the Names and Descriptions of Collections and ContentFiles. There are two Hashtag functions.
List MiscService.Hashtag_Search(string search, PagingParameters pagingParameters);
Search for Hashtags.

Search is the search term to use.
PagingParameters the parameters to specify the size, offset and sort order of the returned results (see
PagingParameters)

Response is a list of matching Hashtags.

    public class Hashtag
    {
        public string Name { get; set; }
        public int? NumberOfContentFiles { get; set; }
        
        
        public int? HashtagId { get; private set; }
        public bool? Active { get; private set; }
        public DateTime? Created { get; private set; }
        
    }
HashtagId is a unique identifier for the hashtag.
Active indicates if the hashtag is still in use.
Created is the date and time the Hashtag record was created.
Name is the name of a category.
NumberOfContentFiles is the number of ContentFiles that this Hashtag exists in.

Categories
Categories are an attribute of ContentFiles. They are stored in the content file record as a comma delimited string. The following is the only Category function.
List MiscService.Category_ListAll();

Response is a list all valid categories.

    public class Category
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public Db.CategoryType CategoryType { get; set; }
        
        
        // not writeable
        public int? CategoryId { get; private set; }
        public bool? Active { get; private set; }
        public DateTime? Created { get; private set; }
        public DateTime? Modified { get; private set; }
    
    }
CategoryId is a unique identifier for the category.
Active indicates if the category is still in use.
Created is the date and time the Category record was created.
Modified is the date and time the Category record was last modified.
SortBy this is a float value that may modify the normal alphabetical display order (not currently used). Name is the name of a category.
Description this is a description of a category (not currently used). CategoryType is the category type (1: Normal, 2:Adult)


top
Search
Searching will return Collection and/or ContentFile results based on a search term and filters (search criteria) that are passed as parameters to the search request. Pagination is supported.

As a general overview on searching, typically several searches are performed. A search is performed on all content files (ContentFileService.Search), this gives you results that show up in the "top row". Additionally a search is performed on the collections and content files (Search_CollectionsAndContentFiles). This is used to retrieve a list of collection that match (or whose content files match) the search criteria.

Then, when one of these collections is viewed, the content files in that collection are retrieved by listing the content files (Collection_ListContentFiles), specifying the search criteria. This will cause *all* content files for that collection to be returned, but the ones that match the search criteria are at the front of the list.

The following are the major Search functions.

ContentFileService.Search will search content files. CollectionService.Search will search collections and their content files.

Other functions that utilize search criteria parameters are:

UserService.ListCollections will list a users collections. UserService.ListUsers will list a users relationships with other users. CollectionService.ListContentFiles will list a collections ContentFiles.

Search Criteria
The following are the parameters that make up the "search criteria" in a request.

Search is a search term that will match the names, descriptions, and categories of an item.
Categories will filter based on a comma delimited list of Categories (e.g. Sports, Golf).
HasPrefix will filter the results by the first letter of the items name (e.g. A, B, C) will limit the list to items whose name starts with the letter A, B, or C).
IncludeAdult filter to include content flagged as adult.


top
Retrieving Media Content
The actual media files (images and movies) are typically retrieved using a simple url. How to build the various urls are the topic of this section.

DeliveryRequestId's and MuxKey's
A MuxKey contains information on the processing status and the playback versions of a movie file that are available. Currently the four playback versions are 3G, WiFi, WebM, and 720p. Each playback version is associated with a "DeliveryRequestId". An example of a MuxKey is:

M2960,13466~3G~3,13467~WiFi~3,13468~WebM~3,13469~720p~4

M2960 is the unique MuxKey identifier.
13466~3G~3 is the 3G asset with a DeliveryRequestId of 13466 and a successful completion status.
13467~WiFi~3 is the WiFi asset with a DeliveryRequestId of 13467 and a successful completion status.
13468~WebM~3 is the WebM asset with a DeliveryRequestId of 13468 and a successful completion status.
13469~720p~4 is the 720p asset with a DeliveryRequestId of 13469 and a failed completion status.

The DeliveryRequestId is the token used to retrieve thumbnail and movie urls. Note: The 3G asset DeliveryRequestId is used to retrieve thumbnails.

Currently the valid asset types are:
3G used for the iPhone (low bandwidth)
WiFi used for the iPhone (high bandwidth)
WebM used for desktop browsers
720p used on all platforms (very high bandwidth)

The completion status is as follows:
-1: waiting on another process
0: not yet started
1: about to start
2: in progress
3: finished (success)
4: finished (failed)

Finally, a MuxKey can also contain information about the download status of an asset:

M2962,-1~3G~2,-1~WiFi~2,-1~WebM~2,-1~720p~2,-1~(Downloading 12.3M of 16.5M)~2
M2962,13474~3G~2,13475~WiFi~2,13476~WebM~2,13477~720p~4,-1~(Downloading Complete)~3

Notes: 720p will only succeed only if the source movie is high-def. The 3G asset can be used on Safari, the Wifi asset is used on IE, Chrome, and Safari. The WebM asset is pretty much only used on Firefox, however Chrome could use the WebM asset as well if the WiFi asset wasn't generated yet.

Movie Url
A movie url is created by combining a DeliveryRequestId and a subType.

http://delivery.eqnetwork.com/service/store/get/?drid=13474&subType=3g

drid=13474 is a DeliveryRequestId of 13474
subType=3g specifies a 3g movie asset

In most cases the subType is the same (or similar) to the asset type returned with the DeliveryRequestId in the MuxKey:
3G: use 3g for subType
WiFi: use iphonewifi for subType
WebM: use webm for subType
720p: use 720p for subType

Movie Preview Url
A movie preview url is created by combining a DeliveryRequestId and a subType.

http://delivery.eqnetwork.com/service/store/get/?drid=13474&subType=mpx

drid=13474 is the 3G asset DeliveryRequestId
subType=mpx specifies that the returned movie should be a 30 second preview.

Thumbnail Url
A thumbnail is created by combining a DeliveryRequestId and a subType.

http://delivery.eqnetwork.com/icons/mgen/overplayThumbnail.ms?drid=13474&subType=ljpg&w=120&h=90&o=0

drid=13474 is the 3G asset DeliveryRequestId
subType=ljpg specifies that the returned thumbnail be a jpg.
w=120 is the maximum width for the retrieved image.
h=90 is the maximum height for the retrieved image.
o=0 specifies if a "play button" image is overlayed (0: no, 1: yes)

Animated Gif Url
A 20 frame animated gif thumbnail is created by combining a DeliveryRequestId and a subType.

http://delivery.eqnetwork.com/service/store/get/?drid=13474&subType=gif

drid=13474 is the 3G asset DeliveryRequestId
subType=gif specifies that the returned thumbnail be an animated gif.

Note: This will generate a 90 x 90 size thumbnail.

User Icon Url
The user icons filename is available as an attribute called IconFilename on a User node. Also, it is sometimes available in other nodes and called OwnerUserIconFilename.

The url to retrieve a user icon is as follows:

http://delivery.eqnetwork.com/icons/mgen/scaleImage.ms?file=UserIcons/eedda75b-0b35-425c-bf72-9effa931907e.tiff&w=80&h=80

file=UserIcons/eedda75b-0b35-425c-bf72-9effa931907e.tiff is the path to the IconFilename (eedda75b-0b35-425c-bf72-9effa931907e.tiff is the IconFilename in this example).
w=80 is the maximum width for the retrieved image.
h=80 is the maximum height for the retrieved image.

Collection Icon Url
The collection icons filename is available as an attribute called IconFilename on a Collection object.

The url to retrieve a collection icon is as follows:

http://delivery.eqnetwork.com/icons/mgen/scaleImage.ms?file=CollectionIcons/2b6a6503-db21-4a34-a496-1f488de5c5c3.jpg&w=80&h=80

file=CollectionIcons/2b6a6503-db21-4a34-a496-1f488de5c5c3.jpg is the path to the IconFilename (2b6a6503-db21-4a34-a496-1f488de5c5c3.jpg is the IconFilename in this example).
w=80 is the maximum width for the retrieved image.
h=80 is the maximum height for the retrieved image.

    public class PagingParameters
    {
        public string OrderBy { get; set; }
        public int? Page { get; set; }
        public int? PageSize { get; set; }

        // returned by API functions
        public bool hasMore { get; set; }

        public PagingParameters();
        public PagingParameters(int pageSize, string orderBy);
        public void NextPage();
    }
    
    public enum PostType
    {
        Unknown,
        ContentFileComment,
        WallComment,
        PostComment,
    }
    
    public enum MembershipType
    {
        Unknown,
        BasicQuota,
    }
    
    public enum InvitationType
    {
        Unknown,
        FollowCollection,
        FollowUser,
    }
    
    public enum RequestType
    {
        Unknown,
        FollowCollection,
        FollowUser,
    }
    
    public enum SocialService
    {
        Unknown,
        Facebook,
        Twitter,
    }
    
    public enum SocialSearchType
    {
        SearchAll = 0,
        SearchEqMembers = 1 << 0,
        SearchNonEqMembers = 1 << 1
    }
    
    public enum CollectionType
    {
        Unknown,
        User,
        Private,
    }
    
    public enum User_CollectionType
    {
        Unknown,
        Owner,
        Follower,
        Contributor,
        ViewInfoOnly,
    }
    
    public enum SocialBits
    {
        VideosIWatch = 1,
        VideosIUpload = 2,
        VideosICommentOn = 4,
        VideosIShare = 8,
        ChannelsIFollow = 16,
        ChannelsICreate = 32,
        ChannelsIShare = 64,
        UsersIFollow = 128,
        VideosILike = 256,
        ChannelsILike = 512,
        UsersILike = 1024,
        VideosIFavorite = 2048,
    }