@@ -82,61 +82,34 @@ func (i OAuthClient) GetUpdateOptions() (o OAuthClientUpdateOptions) {
8282
8383// ListOAuthClients lists OAuthClients
8484func (c * Client ) ListOAuthClients (ctx context.Context , opts * ListOptions ) ([]OAuthClient , error ) {
85- response , err := getPaginatedResults [OAuthClient ](ctx , c , "account/oauth-clients" , opts )
86- if err != nil {
87- return nil , err
88- }
89-
90- return response , nil
85+ return getPaginatedResults [OAuthClient ](ctx , c , "account/oauth-clients" , opts )
9186}
9287
9388// GetOAuthClient gets the OAuthClient with the provided ID
9489func (c * Client ) GetOAuthClient (ctx context.Context , clientID string ) (* OAuthClient , error ) {
9590 e := formatAPIPath ("account/oauth-clients/%s" , clientID )
96- response , err := doGETRequest [OAuthClient ](ctx , c , e )
97- if err != nil {
98- return nil , err
99- }
100-
101- return response , nil
91+ return doGETRequest [OAuthClient ](ctx , c , e )
10292}
10393
10494// CreateOAuthClient creates an OAuthClient
10595func (c * Client ) CreateOAuthClient (ctx context.Context , opts OAuthClientCreateOptions ) (* OAuthClient , error ) {
106- e := "account/oauth-clients"
107- response , err := doPOSTRequest [OAuthClient ](ctx , c , e , opts )
108- if err != nil {
109- return nil , err
110- }
111-
112- return response , nil
96+ return doPOSTRequest [OAuthClient ](ctx , c , "account/oauth-clients" , opts )
11397}
11498
11599// UpdateOAuthClient updates the OAuthClient with the specified id
116100func (c * Client ) UpdateOAuthClient (ctx context.Context , clientID string , opts OAuthClientUpdateOptions ) (* OAuthClient , error ) {
117101 e := formatAPIPath ("account/oauth-clients/%s" , clientID )
118- response , err := doPUTRequest [OAuthClient ](ctx , c , e , opts )
119- if err != nil {
120- return nil , err
121- }
122-
123- return response , nil
102+ return doPUTRequest [OAuthClient ](ctx , c , e , opts )
124103}
125104
126105// DeleteOAuthClient deletes the OAuthClient with the specified id
127106func (c * Client ) DeleteOAuthClient (ctx context.Context , clientID string ) error {
128107 e := formatAPIPath ("account/oauth-clients/%s" , clientID )
129- err := doDELETERequest (ctx , c , e )
130- return err
108+ return doDELETERequest (ctx , c , e )
131109}
132110
133111// ResetOAuthClientSecret resets the OAuth Client secret for a client with a specified id
134112func (c * Client ) ResetOAuthClientSecret (ctx context.Context , clientID string ) (* OAuthClient , error ) {
135113 e := formatAPIPath ("account/oauth-clients/%s/reset-secret" , clientID )
136- response , err := doPOSTRequest [OAuthClient , any ](ctx , c , e )
137- if err != nil {
138- return nil , err
139- }
140-
141- return response , nil
114+ return doPOSTRequest [OAuthClient , any ](ctx , c , e )
142115}
0 commit comments