/** * This file is auto-generated by the API client generator. * https://github.com/flowup/api-client-generator * * Avoid editing this file manually unless necessary. * Please report any bugs so they can be addressed in future versions. */ /* tslint:disable */ /* eslint-disable */ import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http'; import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; import { GistsAPIClientInterface } from './gists-api-client.interface'; import { Observable } from 'rxjs';import { DefaultHttpOptions, HttpOptions } from '../../types'; import * as models from '../../models'; export const USE_DOMAIN = new InjectionToken('GistsAPIClient_USE_DOMAIN'); export const USE_HTTP_OPTIONS = new InjectionToken('GistsAPIClient_USE_HTTP_OPTIONS'); type APIHttpOptions = HttpOptions & { headers: HttpHeaders; params: HttpParams; }; @Injectable() export class GistsAPIClient implements GistsAPIClientInterface { readonly options: APIHttpOptions; readonly domain: string = `https://api.github.com`; constructor( private readonly http: HttpClient, @Optional() @Inject(USE_DOMAIN) domain?: string, @Optional() @Inject(USE_HTTP_OPTIONS) options?: DefaultHttpOptions, ) { if (domain != null) { this.domain = domain; } this.options = { headers: new HttpHeaders(options && options.headers ? options.headers : {}), params: new HttpParams(options && options.params ? options.params : {}), ...(options && options.reportProgress ? { reportProgress: options.reportProgress } : {}), ...(options && options.withCredentials ? { withCredentials: options.withCredentials } : {}) }; } /** * List the authenticated user's gists or if called anonymously, this will * return all public gists. * * Response generated for [ 200 ] HTTP response code. */ getGists( args?: GistsAPIClientInterface['getGistsParams'], requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; getGists( args?: GistsAPIClientInterface['getGistsParams'], requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; getGists( args?: GistsAPIClientInterface['getGistsParams'], requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; getGists( args: GistsAPIClientInterface['getGistsParams'] = {}, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('since' in args) { options.params = options.params.set('since', String(args.since)); } if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.get(`${this.domain}${path}`, options); } /** * Create a gist. * Response generated for [ 201 ] HTTP response code. */ postGists( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; postGists( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; postGists( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; postGists( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.post(`${this.domain}${path}`, JSON.stringify(args.body), options); } /** * List all public gists. * Response generated for [ 200 ] HTTP response code. */ getGistsPublic( args?: GistsAPIClientInterface['getGistsPublicParams'], requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; getGistsPublic( args?: GistsAPIClientInterface['getGistsPublicParams'], requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; getGistsPublic( args?: GistsAPIClientInterface['getGistsPublicParams'], requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; getGistsPublic( args: GistsAPIClientInterface['getGistsPublicParams'] = {}, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/public`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('since' in args) { options.params = options.params.set('since', String(args.since)); } if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.get(`${this.domain}${path}`, options); } /** * List the authenticated user's starred gists. * Response generated for [ 200 ] HTTP response code. */ getGistsStarred( args?: GistsAPIClientInterface['getGistsStarredParams'], requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; getGistsStarred( args?: GistsAPIClientInterface['getGistsStarredParams'], requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; getGistsStarred( args?: GistsAPIClientInterface['getGistsStarredParams'], requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; getGistsStarred( args: GistsAPIClientInterface['getGistsStarredParams'] = {}, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/starred`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('since' in args) { options.params = options.params.set('since', String(args.since)); } if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.get(`${this.domain}${path}`, options); } /** * Delete a gist. * Response generated for [ 204 ] HTTP response code. */ deleteGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; deleteGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; deleteGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; deleteGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.delete(`${this.domain}${path}`, options); } /** * Get a single gist. * Response generated for [ 200 ] HTTP response code. */ getGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; getGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; getGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; getGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.get(`${this.domain}${path}`, options); } /** * Edit a gist. * Response generated for [ 200 ] HTTP response code. */ patchGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; patchGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; patchGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; patchGistsId( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.patch(`${this.domain}${path}`, JSON.stringify(args.body), options); } /** * List comments on a gist. * Response generated for [ 200 ] HTTP response code. */ getGistsIdComments( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; getGistsIdComments( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; getGistsIdComments( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; getGistsIdComments( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/comments`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.get(`${this.domain}${path}`, options); } /** * Create a commen * Response generated for [ 201 ] HTTP response code. */ postGistsIdComments( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; postGistsIdComments( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; postGistsIdComments( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; postGistsIdComments( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/comments`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.post(`${this.domain}${path}`, JSON.stringify(args.body), options); } /** * Delete a comment. * Response generated for [ 204 ] HTTP response code. */ deleteGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; deleteGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; deleteGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; deleteGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/comments/${args.commentId}`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.delete(`${this.domain}${path}`, options); } /** * Get a single comment. * Response generated for [ 200 ] HTTP response code. */ getGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; getGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; getGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; getGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/comments/${args.commentId}`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.get(`${this.domain}${path}`, options); } /** * Edit a comment. * Response generated for [ 200 ] HTTP response code. */ patchGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; patchGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; patchGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; patchGistsIdCommentsCommentId( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/comments/${args.commentId}`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.patch(`${this.domain}${path}`, JSON.stringify(args.body), options); } /** * Fork a gist. * Response generated for [ 204 ] HTTP response code. */ postGistsIdForks( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; postGistsIdForks( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; postGistsIdForks( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; postGistsIdForks( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/forks`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.post(`${this.domain}${path}`, null, options); } /** * Unstar a gist. * Response generated for [ 204 ] HTTP response code. */ deleteGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; deleteGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; deleteGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; deleteGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/star`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.delete(`${this.domain}${path}`, options); } /** * Check if a gist is starred. * Response generated for [ 204 ] HTTP response code. */ getGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; getGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; getGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; getGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/star`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.get(`${this.domain}${path}`, options); } /** * Star a gist. * Response generated for [ 204 ] HTTP response code. */ putGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'body', ): Observable; putGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'response', ): Observable>; putGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe?: 'events', ): Observable>; putGistsIdStar( args: Exclude, requestHttpOptions?: HttpOptions, observe: any = 'body', ): Observable | HttpEvent> { const path = `/gists/${args.id}/star`; const options = { ...this.options, ...requestHttpOptions, observe, }; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); } if ('accept' in args) { options.headers = options.headers.set('Accept', String(args.accept)); } if ('xRateLimit' in args) { options.headers = options.headers.set('X-RateLimit-Limit', String(args.xRateLimit)); } if ('xRateLimitRemaining' in args) { options.headers = options.headers.set('X-RateLimit-Remaining', String(args.xRateLimitRemaining)); } if ('xRateLimitReset' in args) { options.headers = options.headers.set('X-RateLimit-Reset', String(args.xRateLimitReset)); } if ('xGitHubRequestId' in args) { options.headers = options.headers.set('X-GitHub-Request-Id', String(args.xGitHubRequestId)); } return this.http.put(`${this.domain}${path}`, null, options); } }