C# Class Net.Pokeshot.JiveSdk.Clients.ContentsClient

Inheritance: JiveClient
Mostrar archivo Open project: jivesoftware/JiveDotNetSDK

Private Properties

Property Type Description

Public Methods

Method Description
ContentsClient ( string communityUrl, NetworkCredential credentials ) : System
CreateAbuseReport ( int contentID, AbuseReport abuse_report ) : AbuseReport

Register that the requesting person considers the specified content as abusive.

CreateComment ( int contentID, Comment comment, bool author = false, System.DateTime published = null, System.DateTime updated = null, List fields = null ) : Comment

Create a new comment as a reply to the specified content object. The parent field (if any) in the incoming entity will be ignored. Instead, it will be set to the URI of the specified content object.

CreateContent ( GenericContent content, System.DateTime published = null, System.DateTime updated = null, List fields = null ) : GenericContent

Create a new content object with specified characteristics, and return an entity representing the newly created content object.

CreateContentHelpful ( int contentID ) : void

Register that the requesting person considers the specified content helpful. Note: If this is the first time the specified content has been marked helpful a helpful outcome will be created. Note: This is only valid on a select few types of content, such as messages.

CreateContentLike ( int contentID ) : void

Register that the requesting person likes the specified content object.

CreateContentUnhelpful ( int contentID ) : void

Register that the requesting person considers the specified content unhelpful. Note: This is only valid on a select few types of content, such as messages.

DestroyContent ( int contentID, bool hardDelete = false ) : string

Delete the specified content object.

DestroyContentHelpful ( int contentID ) : void

Delete the registration of the specified content as helpful by the requesting user.

DestroyContentLike ( int contentID ) : void

Delete the like of the specified content object by the requesting user.

DestroyContentUnhelpful ( int contentID ) : void

Delete the registration of the specified content as unhelpful by the requesting user.

GetAbuseReports ( int contentID, List fields = null ) : List

Retrieve the abuse reports for the specified content

GetChildOutComeTypes ( int contentID, bool isCreate = true, int startIndex, int count = 25, List fields = null ) : List

Return a paginated list of the possible OutcomeTypes for the children of the specified object.

GetComments ( int contentID, List filter = null, bool excludeReplies = false, bool hierarchical = true, bool author = false, bool inline = false, string sort = "dateasc", int startIndex, int count = 25, string anchor = null, List fields = null ) : List

Return a paginated list of comments to the specified content object, optionally limiting the returned results to direct replies only. The specified content object type must support comments, or be a comment itself (in which case replies to this comment only are returned).

GetContent ( int contentID, List fields = null, bool abridged = false ) : GenericContent

Return the specified content object with the specified fields.

GetContentData ( int ContentID ) : byte[]

Return the binary content of the specified file (returns ConflictException on any other content object type).

GetContentFollowers ( int contentID, int startIndex, int count = 25, List fields = null ) : List

Return a paginated list of Persons about people who are following the specified content.

GetContentLikes ( int contentID, int startIndex, int count = 25, List fields = null ) : List

Return a paginated list of the people who like the specified content object.

GetContents ( DateTime>.Tuple creationDate = null, DateTime>.Tuple modificationDate = null, int count = 25, List filter = null, string sort = "dateCreatedDesc", int startIndex, List fields = null, bool abridged = false, bool includeBlogs = true ) : List

Return a list of content objects that match the specified filter criteria.

GetFeaturedContent ( List places, int count = 25, bool abridged = false, List filter = null, List fields = null ) : List

Return a list of featured content objects that match the specified filter criteria.

GetOutcomeTypes ( int contentID, int startIndex, int count = 25, List fields = null ) : List

Return a paginated list of the possible OutcomeTypes for the specified content object.

GetPopularContent ( bool abridged = false, List fields = null ) : List

Return a list of popular content objects for the authenticated user. Use this service when recommendation is disabled. Do a GET to /api/core/v3/metadata/properties/feature.recommender.enabled to figure out whether recommendation service is enabled or not. The returned list may contain a mixture of content entities of various types.On any given content object entity, use the type field to determine the type of that particular content.

GetPreviewImage ( int contentID, string size = "original", string returnDefaultImageWhenNoPreviewAvailable = "false" ) : byte[]

Return a preview image that represents a content item. If returnDefaultImageWhenNoPreviewAvailable is true and no preview exists for the specified content item, a default preview image will be displayed. For content created in a place, the default image will represent the place where the content was created. For personal content, the default image will represent the creator of the content item. If false, a not found response will be returned if no preview is available for this content. Defaults to false, if no value for this param is provided.

GetRecentContent ( bool abridged = false, List filter = null, int startIndex, int count = 25, List fields = null ) : List

Return a list of recently updated content objects that match the specified filter criteria. The returned list may contain a mixture of content entities of various types. On any given content object, use the type field to determine the type of that particular content.

GetRecommendedContent ( bool abridged = false, int count = 25, List fields = null ) : List

Return a list of recommended content objects for the authenticated user. When recommender service is not enabled in the Jive instance then predefined recommended content is going to be returned instead. Do a GET to /api/core/v3/metadata/properties/feature.recommender.enabled to figure out whether recommendation service is enabled or not. The returned list may contain a mixture of content entities of various types. On any given content object entity, use the type field to determine the type of that particular content.

GetTrendingContent ( bool abridged = false, List filter = null, int count = 25, List fields = null ) : List

Return a list of trending content objects that match the specified filter criteria. It's possible for some Jiva instances to have recommendation disabled, for these cases use getPopularContent(abridged, fields) instead. Do a GET to /api/core/v3/metadata/properties/feature.recommender.enabled to figure out whether recommendation service is enabled or not.

UpdateContent ( int contentID, GenericContent content, bool minor = true, bool abridged = false, System.DateTime updated = null, List fields = null ) : GenericContent

Update an existing content with specified characteristics.

Method Details

ContentsClient() public method

public ContentsClient ( string communityUrl, NetworkCredential credentials ) : System
communityUrl string
credentials System.Net.NetworkCredential
return System

CreateAbuseReport() public method

Register that the requesting person considers the specified content as abusive.
public CreateAbuseReport ( int contentID, AbuseReport abuse_report ) : AbuseReport
contentID int ID of the content marked as abusive
abuse_report Net.Pokeshot.JiveSdk.Models.AbuseReport an AbuseReport object containing the abuse report information
return Net.Pokeshot.JiveSdk.Models.AbuseReport

CreateComment() public method

Create a new comment as a reply to the specified content object. The parent field (if any) in the incoming entity will be ignored. Instead, it will be set to the URI of the specified content object.
public CreateComment ( int contentID, Comment comment, bool author = false, System.DateTime published = null, System.DateTime updated = null, List fields = null ) : Comment
contentID int ID of the content object this comment applies to
comment Net.Pokeshot.JiveSdk.Models.Comment a Comment object describing the comment to be created
author bool Flag indicating if new comment is an author comment or a regular comment (only valid for documents). /// By default a regular document will be created.
published System.DateTime Date and time when this content object was originally created. Set 'updated' param as well. /// Only set this field when importing content.
updated System.DateTime Date and time when this content object was most recently updated. Set 'published' param as well. /// Only set this field when importing content.
fields List Fields to include in the returned Comment object
return Net.Pokeshot.JiveSdk.Models.Comment

CreateContent() public method

Create a new content object with specified characteristics, and return an entity representing the newly created content object.
public CreateContent ( GenericContent content, System.DateTime published = null, System.DateTime updated = null, List fields = null ) : GenericContent
content Net.Pokeshot.JiveSdk.Models.GenericContent The content object to be created
published System.DateTime Date and time when this content object was originally created. Set 'updated' param as well. Only set this field when importing content.
updated System.DateTime Date and time when this content object was most recently updated. Set 'published' param as well. Only set this field when importing content.
fields List The fields to include in the returned entity
return Net.Pokeshot.JiveSdk.Models.GenericContent

CreateContentHelpful() public method

Register that the requesting person considers the specified content helpful. Note: If this is the first time the specified content has been marked helpful a helpful outcome will be created. Note: This is only valid on a select few types of content, such as messages.
public CreateContentHelpful ( int contentID ) : void
contentID int ID of the content to be marked as helpful
return void

CreateContentLike() public method

Register that the requesting person likes the specified content object.
public CreateContentLike ( int contentID ) : void
contentID int ID of the content object to be liked
return void

CreateContentUnhelpful() public method

Register that the requesting person considers the specified content unhelpful. Note: This is only valid on a select few types of content, such as messages.
public CreateContentUnhelpful ( int contentID ) : void
contentID int ID of the content to be marked as unhelpful
return void

DestroyContent() public method

Delete the specified content object.
public DestroyContent ( int contentID, bool hardDelete = false ) : string
contentID int ID of the content object to be deleted
hardDelete bool Boolean indicating whether a soft or hard delete should be performed. Only used for content that supports hard/soft delete (default is false). Ignored otherwise.
return string

DestroyContentHelpful() public method

Delete the registration of the specified content as helpful by the requesting user.
public DestroyContentHelpful ( int contentID ) : void
contentID int ID of the content for which a helpful registration is being removed
return void

DestroyContentLike() public method

Delete the like of the specified content object by the requesting user.
public DestroyContentLike ( int contentID ) : void
contentID int The ID of the content object for which a like is being removed
return void

DestroyContentUnhelpful() public method

Delete the registration of the specified content as unhelpful by the requesting user.
public DestroyContentUnhelpful ( int contentID ) : void
contentID int ID of the content for which a unhelpful registration is being removed
return void

GetAbuseReports() public method

Retrieve the abuse reports for the specified content
public GetAbuseReports ( int contentID, List fields = null ) : List
contentID int ID of the content marked as abusive
fields List Fields to be returned in the abuse report response
return List

GetChildOutComeTypes() public method

Return a paginated list of the possible OutcomeTypes for the children of the specified object.
public GetChildOutComeTypes ( int contentID, bool isCreate = true, int startIndex, int count = 25, List fields = null ) : List
contentID int ID of the content object's children to get the outcome types for
isCreate bool Is list of types for create or view
startIndex int Zero-relative index of the first outcome type to be returned
count int Maximum number of outcome types to be returned
fields List Fields to be returned on outcome types
return List

GetComments() public method

Return a paginated list of comments to the specified content object, optionally limiting the returned results to direct replies only. The specified content object type must support comments, or be a comment itself (in which case replies to this comment only are returned).
public GetComments ( int contentID, List filter = null, bool excludeReplies = false, bool hierarchical = true, bool author = false, bool inline = false, string sort = "dateasc", int startIndex, int count = 25, string anchor = null, List fields = null ) : List
contentID int ID of the content object for which to return comments
filter List The filter criteria used to select comments
excludeReplies bool Flag indicating whether to exclude replies (and therefore return direct comments only)
hierarchical bool Flag indicating that comments should be returned in hierarchical order instead of chronological order
author bool Flag indicating if author comments should be returned or regular comments (only valid for documents). By default regular comments are returned.
inline bool Flag indicating if inline comments should be returned or regular comments (only valid for binary documents). By default regular comments are returned.
sort string Parameter indicating the sort order of the returned comments (only valid for inline comments). By default the sort order is dateasc
startIndex int Zero-relative index of the first comment to be returned
count int Maximum number of comments to be returned
anchor string optional URI for a comment to anchor at. Specifying a anchor will try to return the page containing the anchor. If the anchor could not be found then the first page of comments will be returned.
fields List Fields to be returned in the selected comments
return List

GetContent() public method

Return the specified content object with the specified fields.
public GetContent ( int contentID, List fields = null, bool abridged = false ) : GenericContent
contentID int ID of the content object to be returned
fields List Fields to be returned
abridged bool Flag indicating that if content.text is requested, it will be abridged (length shortened, HTML tags removed)
return Net.Pokeshot.JiveSdk.Models.GenericContent

GetContentData() public method

Return the binary content of the specified file (returns ConflictException on any other content object type).
public GetContentData ( int ContentID ) : byte[]
ContentID int ID of the content object for which binary content should be returned
return byte[]

GetContentFollowers() public method

Return a paginated list of Persons about people who are following the specified content.
public GetContentFollowers ( int contentID, int startIndex, int count = 25, List fields = null ) : List
contentID int ID of the content object to check for followers
startIndex int Zero-relative index of the first instance to be returned
count int Maximum number of instances to be returned (i.e. the page size)
fields List Fields to be returned (or null for summary fields)
return List

GetContentLikes() public method

Return a paginated list of the people who like the specified content object.
public GetContentLikes ( int contentID, int startIndex, int count = 25, List fields = null ) : List
contentID int ID of the content object for which to return liking people
startIndex int Zero-relative index of the first person to be returned
count int Maximum number of people to be returned per Jive HTTP request
fields List Fields to be returned on liking people
return List

GetContents() public method

Return a list of content objects that match the specified filter criteria.
public GetContents ( DateTime>.Tuple creationDate = null, DateTime>.Tuple modificationDate = null, int count = 25, List filter = null, string sort = "dateCreatedDesc", int startIndex, List fields = null, bool abridged = false, bool includeBlogs = true ) : List
creationDate DateTime>.Tuple A Tuple representing the creation date range to consider when querying for Content. /// The first DateTime in the Tuple is after date - Creation date of content must be greater than or equal to this date. Use null to specify no restriction. /// The second DateTime in the Tuple is before date - Creation date of content must be less than or equal to this date. Use null to specify no restriction. /// This overrides any modificationDate that may be specified in filter.
modificationDate DateTime>.Tuple A Tuple representing the modification date range to consider when querying for Content. /// The first DateTime in the Tuple is after date - Modification date of content must be greater than or equal to this date. Use null to specify no restriction. /// The second DateTime in the Tuple is before date - Modification date of content must be less than or equal to this date. Use null to specify no restriction. /// This overrides any creationDate that may be specified in filter.
count int The maximum number of contents to be returned at a time.
filter List The filter criteria used to select content objects
sort string The requested sort order
startIndex int The zero-relative index of the first matching content to be returned
fields List The fields to be returned on each content
abridged bool Flag indicating that if content.text is requested, it will be abridged (length shortened, HTML tags removed)
includeBlogs bool Flag indicating that filters should include blog containers
return List

GetFeaturedContent() public method

Return a list of featured content objects that match the specified filter criteria.
public GetFeaturedContent ( List places, int count = 25, bool abridged = false, List filter = null, List fields = null ) : List
places List A list of URIs of places to consider when queying the featured content. /// (e.g. http://domain/api/core/v3/places/1006) /// Do not specify a place filter in the filter parameter!
count int The maximum number of contents to be returned per Jive HTTP request
abridged bool Flag indicating that if content.text is requested, it will be abridged (length shortened, HTML tags removed)
filter List The filter criteria used to select content objects
fields List The fields to be returned on each content
return List

GetOutcomeTypes() public method

Return a paginated list of the possible OutcomeTypes for the specified content object.
public GetOutcomeTypes ( int contentID, int startIndex, int count = 25, List fields = null ) : List
contentID int ID of the content object to get the outcome types for
startIndex int Zero-relative index of the first outcome type to be returned
count int Maximum number of outcome types to be returned per Jive HTTP request
fields List Fields to be returned on outcome types
return List

GetPopularContent() public method

Return a list of popular content objects for the authenticated user. Use this service when recommendation is disabled. Do a GET to /api/core/v3/metadata/properties/feature.recommender.enabled to figure out whether recommendation service is enabled or not. The returned list may contain a mixture of content entities of various types.On any given content object entity, use the type field to determine the type of that particular content.
public GetPopularContent ( bool abridged = false, List fields = null ) : List
abridged bool Flag indicating that if content.text is requested, it will be abridged (length shortened, HTML tags removed)
fields List The fields to be returned on each content
return List

GetPreviewImage() public method

Return a preview image that represents a content item. If returnDefaultImageWhenNoPreviewAvailable is true and no preview exists for the specified content item, a default preview image will be displayed. For content created in a place, the default image will represent the place where the content was created. For personal content, the default image will represent the creator of the content item. If false, a not found response will be returned if no preview is available for this content. Defaults to false, if no value for this param is provided.
public GetPreviewImage ( int contentID, string size = "original", string returnDefaultImageWhenNoPreviewAvailable = "false" ) : byte[]
contentID int ID of the content that the preview represents
size string Preferred size ("original", "small", "medium", "large"), default is "original" resolution. /// Certain content may not support size parameters and will always return the same size image
returnDefaultImageWhenNoPreviewAvailable string When true, if there is no preview available for the content item a default image representing /// the content item will be returned. Otherwise, a not found response will be returned.
return byte[]

GetRecentContent() public method

Return a list of recently updated content objects that match the specified filter criteria. The returned list may contain a mixture of content entities of various types. On any given content object, use the type field to determine the type of that particular content.
public GetRecentContent ( bool abridged = false, List filter = null, int startIndex, int count = 25, List fields = null ) : List
abridged bool Flag indicating that if content.text is requested, it will be abridged (length shortened, HTML tags removed)
filter List The filter criteria used to select content objects. Parameters, when used, should be wrapped in parentheses, /// and multiple values separated by commas. This service supports the following filters: /// place - only one place URI where the content lives, e.g. 'place(http://domain/api/core/v3/places/1006)' /// type - one or more object types of desired contained content objects separated by commas, e.g. 'type(document,discussion)'
startIndex int The zero relative index of the first content object to be returned
count int The maximum number of content objects to be returned per Jive HTTP request
fields List The fields to be returned on each content object /// Note: unlike other Get methods, this will not return all fields without specifying them
return List

GetRecommendedContent() public method

Return a list of recommended content objects for the authenticated user. When recommender service is not enabled in the Jive instance then predefined recommended content is going to be returned instead. Do a GET to /api/core/v3/metadata/properties/feature.recommender.enabled to figure out whether recommendation service is enabled or not. The returned list may contain a mixture of content entities of various types. On any given content object entity, use the type field to determine the type of that particular content.
public GetRecommendedContent ( bool abridged = false, int count = 25, List fields = null ) : List
abridged bool Flag indicating that if content.text is requested, it will be abridged (length shortened, HTML tags removed)
count int The maximum number of contents to be returned per Jive HTTP request
fields List The fields to be returned on each content
return List

GetTrendingContent() public method

Return a list of trending content objects that match the specified filter criteria. It's possible for some Jiva instances to have recommendation disabled, for these cases use getPopularContent(abridged, fields) instead. Do a GET to /api/core/v3/metadata/properties/feature.recommender.enabled to figure out whether recommendation service is enabled or not.
public GetTrendingContent ( bool abridged = false, List filter = null, int count = 25, List fields = null ) : List
abridged bool Flag indicating that if content.text is requested, it will be abridged (length shortened, HTML tages removed)
filter List The filter criteria used to select content objects. Parameters, when used, should be wrapped in parentheses, /// and multiple values separated by commas. This service supports the following filters: /// place - only one place URI where the content lives, e.g. 'place(http://domain/api/core/v3/places/1006)' /// type - one or more object types of desired contained content objects separated by commas, e.g. 'type(document,discussion)'
count int The maximum number of contents to be returned per Jive HTTP request
fields List The fields to be returned on each content
return List

UpdateContent() public method

Update an existing content with specified characteristics.
public UpdateContent ( int contentID, GenericContent content, bool minor = true, bool abridged = false, System.DateTime updated = null, List fields = null ) : GenericContent
contentID int ID of the content object to be updated
content Net.Pokeshot.JiveSdk.Models.GenericContent GenericContent object describing the content to be updated
minor bool Flag indicating whether this update is a minor edit (true) or not (false)
abridged bool Flag indicating that if content.text is requested, it will be abridged (length shortened, HTML tags removed)
updated System.DateTime Date and time when this content object was most recently updated. Only set this field when importing content.
fields List Fields to include in the returned entity
return Net.Pokeshot.JiveSdk.Models.GenericContent