Esempio n. 1
0
        public async Task <TrackActionResponse> CollectionOperationAsync(
            MediaNamespace mediaNamespace,
            TrackActionType operation,
            TrackActionRequest trackActionRequest)
        {
            Dictionary <string, string> requestParameters = FormatRequestParameters();

            return(await ApiCallWithUserAuthorizationHeaderRefreshAsync(
                       headers => PostAsync <TrackActionResponse, TrackActionRequest>(
                           Hostname,
                           $"/1/content/{mediaNamespace}/collection/{operation}",
                           trackActionRequest,
                           new CancellationToken(false),
                           requestParameters,
                           headers)));
        }
        public async Task <TrackActionResponse> CollectionOperationAsync(Namespace mediaNamespace, TrackActionType operation, TrackActionRequest trackActionRequest)
        {
            Dictionary <string, string> requestParameters = await FormatRequestParametersAsync();

            return(await PostWithRetryOnExpiredTokenAsync <TrackActionResponse, TrackActionRequest>("/1/content/" + mediaNamespace + "/collection/" + operation,
                                                                                                    trackActionRequest, new CancellationToken(false), requestParameters));
        }