// Communities public static async Task <RestCommunity> GetCommunityAsync(BaseTwitchClient client, string communityId, bool isname, RequestOptions options = null) { var model = await client.ApiClient.GetCommunityAsync(communityId, isname, options).ConfigureAwait(false); if (model != null) { return(RestCommunity.Create(client, model)); } return(null); }
public static async Task <RestCommunity> GetCommunityAsync(BaseRestClient client, string id, bool isname = false) { var token = TokenHelper.GetSingleToken(client); var model = await client.RestClient.GetCommunityInternalAsync(token, id, isname); if (model == null) { return(null); } return(RestCommunity.Create(client, model)); }