public static List <ContactType> ListContactTypes(this RestfulBusinessApiClient api, int?pageIndex = null, int?pageSize = null) { var query = MakePagingQuery(pageIndex, pageSize); return(api.GetJson <List <ContactType> >("ContactTypes/" + query.ToQueryString()) ?? new List <ContactType>()); }
/// <summary> /// Lists Users using pageIndex & pageSize. pageSize is limited to 200 results. /// </summary> /// <param name="api"></param> /// <param name="pageIndex">current page index</param> /// <param name="pageSize">requested page size, under 200.</param> /// <returns></returns> /// <remarks> /// The server will limit pages to 200 records, using paging to get all records. /// </remarks> public static List <UserSummary> ListUsers(this RestfulBusinessApiClient api, int?pageIndex = null, int?pageSize = null) { var query = MakePagingQuery(pageIndex, pageSize); return(api.GetJson <List <UserSummary> >("Users/" + query.ToQueryString()) ?? new List <UserSummary>()); }
public static Asset GetAsset(this RestfulBusinessApiClient api, string id) { if (id == null) { throw new ArgumentNullException(nameof(id)); } return(api.GetJson <Asset>("Assets/" + id.UrlEncode())); }
public static User GetUser(this RestfulBusinessApiClient api, string id) { if (id == null) { throw new ArgumentNullException(nameof(id)); } return(api.GetJson <User>("Users/" + id.UrlEncode())); }
public static Restaurant GetRestaurant(this RestfulBusinessApiClient api, string id) { return(api.GetJson <Restaurant>("Restaurants/" + id.UrlEncode())); }
public static RetailLocation GetRetailLocation(this RestfulBusinessApiClient api, string id) { return(api.GetJson <RetailLocation>("RetailLocations/" + id.UrlEncode())); }