Flickrex.Flickr.Testimonials (flickrex v0.8.1) View Source
Link to this section Summary
Functions
Write a new testimonial
Approve a testimonial that has been written about the currently loggedin user
Permanently delete a testimonial. The loggedin user must be either the author or recipient of the testimonial
Change the text of a testimonial. The loggedin user must be the author of the existing testimonial. Editing a testimonial will mark it as pending and will require it to be re-approved by the recipient before appearing on their profile
Get all testimonials (pending and approved) written about the given user
Get the testimonial by the currently logged-in user about the given user, regardless of approval status. Note that at most 1 testimonial will be returned
Get all testimonials (pending and approved) written by the given user
Get all pending testimonials written about the given user
Get the pending testimonial by the currently logged-in user about the given user. Note that at most 1 testimonial will be returned
Get all pending testimonials written by the given user
Get approved testimonials about the given user
Get the approved testimonial by the currently logged-in user about the given user. Note that at most 1 testimonial will be returned
Get approved testimonials written by the given user
Link to this section Types
Specs
arg() :: String.Chars.t()
Specs
operation() :: Flickrex.Operation.Rest.t()
Specs
opts() :: Flickrex.Rest.args()
Link to this section Functions
Specs
Write a new testimonial
This method requires authentication with "write" permission.
Arguments
user_id- ID of the user the testimonial is abouttestimonial_text- The text of the testimonial. HTML/BBCode is not accepted
Example response
%{
"stat" => "ok",
"testimonial" => %{
"about_user" => %{
"is_ad_free" => "0",
"ispro" => "0",
"nsid" => "516314214@N05",
"path_alias" => "stpaul",
"realname" => "paul peterson",
"username" => "paul"
},
"approved" => "0",
"body" => "great photographer!",
"by_user" => %{
"is_ad_free" => "0",
"ispro" => "1",
"nsid" => "45937598@N01",
"path_alias" => "",
"realname" => "john nelson",
"username" => "john"
},
"date_approved" => "0",
"date_create" => "1491516194",
"id" => "72157659275062162"
}
} Specs
Approve a testimonial that has been written about the currently loggedin user
This method requires authentication with "write" permission.
Arguments
testimonial_id- ID of the testimonial to approve
Specs
Permanently delete a testimonial. The loggedin user must be either the author or recipient of the testimonial
This method requires authentication with "write" permission.
Arguments
testimonial_id-
edit_testimonial(user_id, testimonial_id, testimonial_text, opts \\ [])
View SourceSpecs
Change the text of a testimonial. The loggedin user must be the author of the existing testimonial. Editing a testimonial will mark it as pending and will require it to be re-approved by the recipient before appearing on their profile
This method requires authentication with "write" permission.
Arguments
user_id- The NSID of the user the testimonial is abouttestimonial_id- The ID of the testimonial to edittestimonial_text- The text of the testimonial. HTML/BBCode is not accepted
Example response
%{
"stat" => "ok",
"testimonial" => %{
"about_user" => %{
"is_ad_free" => "0",
"ispro" => "0",
"nsid" => "516314214@N05",
"path_alias" => "stpaul",
"realname" => "paul peterson",
"username" => "paul"
},
"approved" => "0",
"body" => "great photographer!",
"by_user" => %{
"is_ad_free" => "0",
"ispro" => "1",
"nsid" => "45937598@N01",
"path_alias" => "",
"realname" => "john nelson",
"username" => "john"
},
"date_approved" => "0",
"date_create" => "1491516194",
"id" => "72157659275062162"
}
} Specs
Get all testimonials (pending and approved) written about the given user
This method requires authentication with "read" permission.
Options
page- Page number. Default is 0per_page- Number of testimonials to return per page. Default is 10, maximum is 50
Specs
Get the testimonial by the currently logged-in user about the given user, regardless of approval status. Note that at most 1 testimonial will be returned
This method requires authentication with "read" permission.
Arguments
user_id- ID of the user to get testimonials about
Specs
Get all testimonials (pending and approved) written by the given user
This method requires authentication with "read" permission.
Options
page- Page number. Default is 0per_page- Number of testimonials to return per page. Default is 10, maximum is 50
Specs
Get all pending testimonials written about the given user
This method requires authentication with "read" permission.
Options
page- Page number. Default is 0per_page- Number of testimonials to return per page. Default is 10, maximum is 50
Specs
Get the pending testimonial by the currently logged-in user about the given user. Note that at most 1 testimonial will be returned
This method requires authentication with "read" permission.
Arguments
user_id- ID of the user to get testimonials about
Specs
Get all pending testimonials written by the given user
This method requires authentication with "read" permission.
Options
page- Page number. Default is 0per_page- Number of testimonials to return per page. Default is 10, maximum is 50
Specs
Get approved testimonials about the given user
This method does not require authentication.
Arguments
user_id- ID of the user to get testimonials about
Options
page- Page number. Default is 0per_page- Number of testimonials to return per page. Default is 10, maximum is 50
Specs
Get the approved testimonial by the currently logged-in user about the given user. Note that at most 1 testimonial will be returned
This method requires authentication with "read" permission.
Arguments
user_id- ID of the user to get testimonials about
Specs
Get approved testimonials written by the given user
This method does not require authentication.
Arguments
user_id- ID of the user to get testimonials written by
Options
page- Page number. Default is 0per_page- Number of testimonials to return per page. Default is 10, maximum is 50