コード例 #1
0
        /// <summary>
        /// List all of the applications associated with this account
        /// </summary>
        /// <param name="pageSize">Set the number of items returned on each call to this endpoint. The default is 10 records.</param>
        /// <param name="page">Set the offset from the first page. The default value is 0, calls to this endpoint return a page of page_size. For example, set page_index to 3 to retrieve items 31 - 40 when page_size is the default value.</param>
        /// <param name="AppId">Optional id of specific application to retrieve</param>
        /// <param name="credentials">(Optional) Overridden credentials for only this request</param>
        /// <returns></returns>
        public static List <AppResponse> List(int pageSize = 10, int page = 0, Credentials credentials = null)
        {
            var filter = new AppListFilter()
            {
                page = page, page_size = pageSize
            };

            return(ApiRequest.DoGetRequestWithQueryParameters <AppListResponse>(ApiRequest.GetBaseUriFor(typeof(ApplicationV2), "/v2/applications"), ApiRequest.AuthType.Basic, filter, credentials)._embedded.Applications);
        }
コード例 #2
0
ファイル: ApplicationV2.cs プロジェクト: taylus/nexmo-dotnet
        /// <summary>
        /// List all of the applications associated with this account
        /// </summary>
        /// <param name="pageSize">Set the number of items returned on each call to this endpoint. The default is 10 records.</param>
        /// <param name="page">Set the offset from the first page. The default value is 0, calls to this endpoint return a page of <page_size>. For example, set page_index to 3 to retrieve items 31 - 40 when page_size is the default value.</param>
        /// <param name="AppId">Optional id of specific application to retrieve</param>
        /// <param name="credentials">(Optional) Overridden credentials for only this request</param>
        /// <returns></returns>
        public static List <AppResponse> List(int pageSize = 10, int page = 0, Credentials credentials = null)
        {
            var filter = new AppListFilter()
            {
                page = page, page_size = pageSize
            };
            var response = VersionedApiRequest.DoRequest(ApiRequest.GetBaseUriFor(typeof(ApplicationV2), "/v2/applications"), filter, VersionedApiRequest.AuthType.Basic, credentials);

            return(JsonConvert.DeserializeObject <AppListResponse>(response)._embedded.Applications);
        }