Version 1.4 - Updated on 11/17/2016
#initialize(session) ⇒ Share
————————————————- Share functions —————————————–
def initialize(session)
# Instance variables
@session = session
end
createShare
#createShare(sharedata) ⇒ Object
Creates a share.
Arguments:
sharedata
: Share data in the json format.Returns:
def createShare(sharedata)
params = sharedata
headers = {'Content-Type' => 'application/json'}
response = @session.do_post "shares", params, headers
Sdk::parse_response(response)
end
deleteShare
deleteShare(shareUid) ⇒ Object
Deletes a share.
Arguments:
shareUid
: Id of the shareReturns:
def deleteShare(shareUid)
response = @session.do_delete_without_params "shares/#{shareUid}"
Sdk::parse_response(response, raw=true)
end
getShares
#getShares(cursor = "", filter = "outbound", since = "", tillnow = "", count = '') ⇒ Object
Retrives shares.
Arguments:
cursor
: A cursor used in paginating the response. Cursors are returned as next and prev links in the response body.filter
: Filters the returned shares. Currently the value can only be outbound (shared by the user).since
: The date and time, expressed in the W3C date and time format, after which messages are to be returned.until
: The date and time, expressed in the W3C date and time format, up to which messages are to be returned.count
: Maximum items to include in a paginated response.Returns:
def getShares(cursor = "", filter="outbound", since="", tillnow="", count='')
params = {
"cursor" => cursor.to_s,
"filter" => filter.to_s,
"since" => since,
"until" => tillnow,
"count" => count
}
response = @session.do_get "shares", params
Sdk::parse_response(response)
end
Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.