public string GetAll(string username, VimeoChannelsSort sort, int page, int perPage) { // Initialize the query string NameValueCollection query = new NameValueCollection { { "format", "json" }, { "method", "vimeo.channels.getAll" } }; // Add optional parameters if (!String.IsNullOrEmpty(username)) { query.Add("user_id", username); } if (sort != VimeoChannelsSort.Default) { query.Add("sort", SocialUtils.CamelCaseToUnderscore(sort)); } if (page > 0) { query.Add("page", page + ""); } if (perPage > 0) { query.Add("per_page", perPage + ""); } // Call the Vimeo API return(Client.DoHttpRequestAsString("GET", "http://vimeo.com/api/rest/v2", query, null)); }
public string GetAll(string username, VimeoChannelsSort sort, int page, int perPage) { // Initialize the query string NameValueCollection query = new NameValueCollection { {"format", "json"}, {"method", "vimeo.channels.getAll"} }; // Add optional parameters if (!String.IsNullOrEmpty(username)) query.Add("user_id", username); if (sort != VimeoChannelsSort.Default) query.Add("sort", SocialUtils.CamelCaseToUnderscore(sort)); if (page > 0) query.Add("page", page + ""); if (perPage > 0) query.Add("per_page", perPage + ""); // Call the Vimeo API return Client.DoHttpRequestAsString("GET", "http://vimeo.com/api/rest/v2", query, null); }
public VimeoChannelsResponse GetAll(string username, VimeoChannelsSort sort, int page, int perPage) { return(VimeoChannelsResponse.Parse(JsonConverter.ParseObject(Raw.GetAll(username, sort, page, perPage)))); }
public VimeoChannelsResponse GetAll(string username, VimeoChannelsSort sort, int page, int perPage) { return VimeoChannelsResponse.Parse(JsonConverter.ParseObject(Raw.GetAll(username, sort, page, perPage))); }