diff --git a/client/.openapi-generator/FILES b/client/.openapi-generator/FILES index 0299ede..c0c85e7 100644 --- a/client/.openapi-generator/FILES +++ b/client/.openapi-generator/FILES @@ -20,6 +20,7 @@ api_stripe_service.go api_submit_service.go api_user_collaborations_service.go api_user_highlights_service.go +api_user_lists_service.go api_user_recommendations_service.go api_user_service.go api_vote_service.go @@ -28,6 +29,7 @@ configuration.go docs/AuthenticationServiceAPI.md docs/BakeRepoDto.md docs/BlogSummaryServiceAPI.md +docs/CollaboratorsDto.md docs/ContributionServiceAPI.md docs/ContributorsServiceAPI.md docs/CreateBlogSummaryDto.md @@ -37,12 +39,14 @@ docs/CreateInsightMemberDto.md docs/CreateIssueSummaryDto.md docs/CreateUserCollaborationDto.md docs/CreateUserHighlightDto.md +docs/CreateUserListDto.md docs/DbBakedRepo.md docs/DbCommitAuthors.md docs/DbCommits.md docs/DbContribution.md docs/DbEmoji.md docs/DbEndorsement.md +docs/DbFilteredUser.md docs/DbInsight.md docs/DbInsightMember.md docs/DbPRInsight.md @@ -60,6 +64,8 @@ docs/DbUserHighlight.md docs/DbUserHighlightReaction.md docs/DbUserHighlightReactionResponse.md docs/DbUserHighlightRepo.md +docs/DbUserList.md +docs/DbUserListContributor.md docs/DbUserToUserFollows.md docs/EmojisServiceAPI.md docs/EndorsementsServiceAPI.md @@ -77,6 +83,8 @@ docs/GenerateCodeExplanationDto.md docs/GenerateCodeRefactorSuggestionDto.md docs/GenerateCodeTestSuggestionDto.md docs/GeneratePullRequestDescriptionDto.md +docs/GetContributors200Response.md +docs/GetUserListContributors200Response.md docs/HealthCheckServiceAPI.md docs/HealthStatusService200Response.md docs/HealthStatusService200ResponseInfoValue.md @@ -113,12 +121,14 @@ docs/UpdateUserEmailPreferencesDto.md docs/UpdateUserProfileInterestsDto.md docs/UserCollaborationsServiceAPI.md docs/UserHighlightsServiceAPI.md +docs/UserListsServiceAPI.md docs/UserOnboardingDto.md docs/UserRecommendationsServiceAPI.md docs/UserServiceAPI.md docs/VoteServiceAPI.md docs/VotedRepoDto.md model_bake_repo_dto.go +model_collaborators_dto.go model_create_blog_summary_dto.go model_create_endorsement_dto.go model_create_insight_dto.go @@ -126,12 +136,14 @@ model_create_insight_member_dto.go model_create_issue_summary_dto.go model_create_user_collaboration_dto.go model_create_user_highlight_dto.go +model_create_user_list_dto.go model_db_baked_repo.go model_db_commit_authors.go model_db_commits.go model_db_contribution.go model_db_emoji.go model_db_endorsement.go +model_db_filtered_user.go model_db_insight.go model_db_insight_member.go model_db_pr_insight.go @@ -149,6 +161,8 @@ model_db_user_highlight.go model_db_user_highlight_reaction.go model_db_user_highlight_reaction_response.go model_db_user_highlight_repo.go +model_db_user_list.go +model_db_user_list_contributor.go model_db_user_to_user_follows.go model_find_all_by_repo_id_200_response.go model_find_all_emojis_200_response.go @@ -164,6 +178,8 @@ model_generate_code_explanation_dto.go model_generate_code_refactor_suggestion_dto.go model_generate_code_test_suggestion_dto.go model_generate_pull_request_description_dto.go +model_get_contributors_200_response.go +model_get_user_list_contributors_200_response.go model_health_status_service_200_response.go model_health_status_service_200_response_info_value.go model_health_status_service_503_response.go diff --git a/client/README.md b/client/README.md index c23807f..99c3149 100644 --- a/client/README.md +++ b/client/README.md @@ -115,7 +115,7 @@ ctx = context.WithValue(context.Background(), client.ContextOperationServerVaria ## Documentation for API Endpoints -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -214,6 +214,16 @@ Class | Method | HTTP request | Description *UserHighlightsServiceAPI* | [**GetFollowingHighlights**](docs/UserHighlightsServiceAPI.md#getfollowinghighlights) | **Get** /v1/user/highlights/following | Fetches highlights for users the authenticated user follows *UserHighlightsServiceAPI* | [**GetUserHighlight**](docs/UserHighlightsServiceAPI.md#getuserhighlight) | **Get** /v1/user/highlights/{id} | Retrieves a highlight *UserHighlightsServiceAPI* | [**UpdateHighlightForUser**](docs/UserHighlightsServiceAPI.md#updatehighlightforuser) | **Patch** /v1/user/highlights/{id} | Updates the highlight for the authenticated user +*UserListsServiceAPI* | [**AddListForUser**](docs/UserListsServiceAPI.md#addlistforuser) | **Post** /v1/lists | Adds a new list for the authenticated user +*UserListsServiceAPI* | [**DeleteListForUser**](docs/UserListsServiceAPI.md#deletelistforuser) | **Delete** /v1/lists/{id} | Deletes the list for the authenticated user +*UserListsServiceAPI* | [**DeleteUserListContributor**](docs/UserListsServiceAPI.md#deleteuserlistcontributor) | **Delete** /v1/lists/{id}/contributors/{userListContributorId} | Delete contributor from an individual user list +*UserListsServiceAPI* | [**GetContributors**](docs/UserListsServiceAPI.md#getcontributors) | **Get** /v1/lists/contributors | Retrieves paginated contributors +*UserListsServiceAPI* | [**GetListsForUser**](docs/UserListsServiceAPI.md#getlistsforuser) | **Get** /v1/lists | Gets lists for the authenticated user +*UserListsServiceAPI* | [**GetUserList**](docs/UserListsServiceAPI.md#getuserlist) | **Get** /v1/lists/{id} | Retrieves an individual user list +*UserListsServiceAPI* | [**GetUserListContributors**](docs/UserListsServiceAPI.md#getuserlistcontributors) | **Get** /v1/lists/{id}/contributors | Retrieves contributors for an individual user list +*UserListsServiceAPI* | [**PostUserListContributors**](docs/UserListsServiceAPI.md#postuserlistcontributors) | **Post** /v1/lists/{id}/contributors | Add new contributors to an individual user list +*UserListsServiceAPI* | [**UpdateListForUser**](docs/UserListsServiceAPI.md#updatelistforuser) | **Patch** /v1/lists/{id} | Updates the list for the authenticated user +*UserRecommendationsServiceAPI* | [**FindUserOrgsRepoRecommendations**](docs/UserRecommendationsServiceAPI.md#finduserorgsreporecommendations) | **Get** /v1/user/recommendations/orgs | Listing recommended repos for the authenticated user based on their orgs *UserRecommendationsServiceAPI* | [**FindUserRepoRecommendations**](docs/UserRecommendationsServiceAPI.md#finduserreporecommendations) | **Get** /v1/user/recommendations/repos | Listing recommended repos for the authenticated user *UserServiceAPI* | [**FindAllHighlightsByUsername**](docs/UserServiceAPI.md#findallhighlightsbyusername) | **Get** /v1/users/{username}/highlights | Listing all Highlights for a user and paginate them *UserServiceAPI* | [**FindAllTopReposByUsername**](docs/UserServiceAPI.md#findalltopreposbyusername) | **Get** /v1/users/{username}/top-repos | Listing all Top Repos for a user and paginate them @@ -223,6 +233,7 @@ Class | Method | HTTP request | Description *UserServiceAPI* | [**GetFollowStatusByUsername**](docs/UserServiceAPI.md#getfollowstatusbyusername) | **Get** /v1/users/{username}/follow | Checks if the authenticated user follows the provided username *UserServiceAPI* | [**GetTop10Highlights**](docs/UserServiceAPI.md#gettop10highlights) | **Get** /v1/users/top | List top users *UserServiceAPI* | [**GetUserNotifications**](docs/UserServiceAPI.md#getusernotifications) | **Get** /v1/user/notifications | Retrieves notifications for the authenticated user +*UserServiceAPI* | [**GetUsersByFilter**](docs/UserServiceAPI.md#getusersbyfilter) | **Get** /v1/users/search | Search users *UserServiceAPI* | [**UnfollowUserByUsername**](docs/UserServiceAPI.md#unfollowuserbyusername) | **Delete** /v1/users/{username}/follow | Unfollows a user by username *VoteServiceAPI* | [**DownVoteOneById**](docs/VoteServiceAPI.md#downvoteonebyid) | **Delete** /v1/repos/{id}/vote | Finds a repo by :id and removes existing vote *VoteServiceAPI* | [**DownVoteOneByOwnerAndRepo**](docs/VoteServiceAPI.md#downvoteonebyownerandrepo) | **Delete** /v1/repos/{owner}/{repo}/vote | Finds a repo by :owner and :repo and removes existing vote @@ -235,6 +246,7 @@ Class | Method | HTTP request | Description ## Documentation For Models - [BakeRepoDto](docs/BakeRepoDto.md) + - [CollaboratorsDto](docs/CollaboratorsDto.md) - [CreateBlogSummaryDto](docs/CreateBlogSummaryDto.md) - [CreateEndorsementDto](docs/CreateEndorsementDto.md) - [CreateInsightDto](docs/CreateInsightDto.md) @@ -242,12 +254,14 @@ Class | Method | HTTP request | Description - [CreateIssueSummaryDto](docs/CreateIssueSummaryDto.md) - [CreateUserCollaborationDto](docs/CreateUserCollaborationDto.md) - [CreateUserHighlightDto](docs/CreateUserHighlightDto.md) + - [CreateUserListDto](docs/CreateUserListDto.md) - [DbBakedRepo](docs/DbBakedRepo.md) - [DbCommitAuthors](docs/DbCommitAuthors.md) - [DbCommits](docs/DbCommits.md) - [DbContribution](docs/DbContribution.md) - [DbEmoji](docs/DbEmoji.md) - [DbEndorsement](docs/DbEndorsement.md) + - [DbFilteredUser](docs/DbFilteredUser.md) - [DbInsight](docs/DbInsight.md) - [DbInsightMember](docs/DbInsightMember.md) - [DbPRInsight](docs/DbPRInsight.md) @@ -265,6 +279,8 @@ Class | Method | HTTP request | Description - [DbUserHighlightReaction](docs/DbUserHighlightReaction.md) - [DbUserHighlightReactionResponse](docs/DbUserHighlightReactionResponse.md) - [DbUserHighlightRepo](docs/DbUserHighlightRepo.md) + - [DbUserList](docs/DbUserList.md) + - [DbUserListContributor](docs/DbUserListContributor.md) - [DbUserToUserFollows](docs/DbUserToUserFollows.md) - [FindAllByRepoId200Response](docs/FindAllByRepoId200Response.md) - [FindAllEmojis200Response](docs/FindAllEmojis200Response.md) @@ -280,6 +296,8 @@ Class | Method | HTTP request | Description - [GenerateCodeRefactorSuggestionDto](docs/GenerateCodeRefactorSuggestionDto.md) - [GenerateCodeTestSuggestionDto](docs/GenerateCodeTestSuggestionDto.md) - [GeneratePullRequestDescriptionDto](docs/GeneratePullRequestDescriptionDto.md) + - [GetContributors200Response](docs/GetContributors200Response.md) + - [GetUserListContributors200Response](docs/GetUserListContributors200Response.md) - [HealthStatusService200Response](docs/HealthStatusService200Response.md) - [HealthStatusService200ResponseInfoValue](docs/HealthStatusService200ResponseInfoValue.md) - [HealthStatusService503Response](docs/HealthStatusService503Response.md) diff --git a/client/api/openapi.yaml b/client/api/openapi.yaml index bf1a818..208a30d 100644 --- a/client/api/openapi.yaml +++ b/client/api/openapi.yaml @@ -54,8 +54,6 @@ info: title: '@open-sauced/api.opensauced.pizza' version: "1" servers: -- description: Development - url: http://localhost:3001 - description: Production url: https://api.opensauced.pizza - description: Beta @@ -456,6 +454,50 @@ paths: summary: List top users tags: - User service + /v1/users/search: + get: + operationId: getUsersByFilter + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: Username search query to filter from the list of users + explode: true + in: query + name: username + required: true + schema: + default: "" + type: string + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 10 + maximum: 1000 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DbFilteredUser' + description: "" + "400": + description: Username is required + summary: Search users + tags: + - User service /v1/user/highlights: post: operationId: addHighlightForUser @@ -1162,12 +1204,68 @@ paths: parameters: [] responses: "200": - description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/findAllTopReposByUsername_200_response' + description: Successfully received model list security: - bearer: [] summary: Listing recommended repos for the authenticated user tags: - User Recommendations service + /v1/user/recommendations/orgs: + get: + operationId: findUserOrgsRepoRecommendations + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 10 + maximum: 1000 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: orderDirection + required: false + schema: + $ref: '#/components/schemas/OrderDirectionEnum' + style: form + - description: Range in days + explode: true + in: query + name: range + required: false + schema: + default: 30 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/findAllTopReposByUsername_200_response' + description: Successfully received model list + security: + - bearer: [] + summary: Listing recommended repos for the authenticated user based on their + orgs + tags: + - User Recommendations service /v1/prs/list: get: operationId: listAllPullRequests @@ -2959,60 +3057,52 @@ paths: summary: Updates an insight member information tags: - Insights service - /v1/issues/summary/generate: + /v1/bake: post: - operationId: generateIssueSummary + operationId: Bake a repository with the pizza oven microservice parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateIssueSummaryDto' + $ref: '#/components/schemas/BakeRepoDto' required: true responses: "201": description: "" - "400": - description: Invalid request - security: - - bearer: [] - summary: Generate a summary for an issue - tags: - - Issue summary service - /v1/blogs/summary/generate: - post: - operationId: generateBlogSummary - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateBlogSummaryDto' - required: true - responses: - "201": + "202": description: "" "400": description: Invalid request - security: - - bearer: [] - summary: Generate a summary for a markdown supported blog + summary: postToPizzaOvenService tags: - - Blog summary service - /v1/stripe/webhooks: - post: - operationId: handleStripeWebhook - parameters: [] + - Pizza oven service + /v1/bake/repos/{id}: + get: + operationId: findBakedRepoById + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DbBakedRepo' description: "" - "201": - description: "" + "404": + description: Baked repository not found + summary: Finds a baked repo by :id tags: - - Stripe service - /v1/highlights/list: + - Pizza oven service + /v1/bake/repos/list: get: - operationId: findAllHighlights + operationId: listAllBakedRepos parameters: - explode: true in: query @@ -3049,28 +3139,42 @@ paths: default: 30 type: integer style: form - - description: Highlight Repo Filter - example: open-sauced/insights - explode: true - in: query - name: repo - required: false - schema: - type: string - style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/findAllHighlightsByUsername_200_response' + $ref: '#/components/schemas/listAllBakedRepos_200_response' description: Successfully received model list - summary: Finds all highlights and paginates them + summary: Finds all baked repos and paginates them tags: - - Highlights service - /v1/highlights/featured: + - Pizza oven service + /v1/bake/commit-authors/{id}: get: - operationId: findAllFeaturedHighlights + operationId: findCommitAuthorById + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DbCommitAuthors' + description: "" + "404": + description: Commit author not found + summary: Finds a commit author by :id + tags: + - Pizza oven service + /v1/bake/commit-authors/list: + get: + operationId: listAllCommitAuthors parameters: - explode: true in: query @@ -3107,28 +3211,19 @@ paths: default: 30 type: integer style: form - - description: Highlight Repo Filter - example: open-sauced/insights - explode: true - in: query - name: repo - required: false - schema: - type: string - style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/findAllHighlightsByUsername_200_response' + $ref: '#/components/schemas/listAllCommitAuthors_200_response' description: Successfully received model list - summary: Finds all featured highlights and paginates them + summary: Finds all commit authors and paginates them tags: - - Highlights service - /v1/highlights/{id}/featured: - delete: - operationId: removeAFeaturedHighlight + - Pizza oven service + /v1/bake/commits/{id}: + get: + operationId: findCommitById parameters: - explode: false in: path @@ -3142,38 +3237,340 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DbUserHighlight' + $ref: '#/components/schemas/DbCommits' description: "" - "400": - description: Invalid request "404": - description: Unable to find highlight - security: - - bearer: [] - summary: Remove a highlight from the featured list + description: Commit not found + summary: Finds a commit by :id tags: - - Highlights service - post: - operationId: addAFeaturedHighlight + - Pizza oven service + /v1/bake/commits/list/repo/{id}: + get: + operationId: listAllCommitsByBakedRepoId parameters: - - explode: false - in: path - name: id - required: true + - explode: true + in: query + name: page + required: false schema: + default: 1 + minimum: 1 type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DbUserHighlight' - description: "" - "201": - content: - application/json: - schema: + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 10 + maximum: 1000 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: orderDirection + required: false + schema: + $ref: '#/components/schemas/OrderDirectionEnum' + style: form + - description: Range in days + explode: true + in: query + name: range + required: false + schema: + default: 30 + type: integer + style: form + - explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAllCommitsByBakedRepoId_200_response' + description: Successfully received model list + summary: Finds all commits by baked repo :id and paginates them + tags: + - Pizza oven service + /v1/bake/commits/list/commit-author/{id}: + get: + operationId: listAllCommitsByCommitAuthorId + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 10 + maximum: 1000 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: orderDirection + required: false + schema: + $ref: '#/components/schemas/OrderDirectionEnum' + style: form + - description: Range in days + explode: true + in: query + name: range + required: false + schema: + default: 30 + type: integer + style: form + - explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/listAllCommitsByBakedRepoId_200_response' + description: Successfully received model list + summary: Finds all commits by commit author :id and paginates them + tags: + - Pizza oven service + /v1/issues/summary/generate: + post: + operationId: generateIssueSummary + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateIssueSummaryDto' + required: true + responses: + "201": + description: "" + "400": + description: Invalid request + security: + - bearer: [] + summary: Generate a summary for an issue + tags: + - Issue summary service + /v1/blogs/summary/generate: + post: + operationId: generateBlogSummary + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateBlogSummaryDto' + required: true + responses: + "201": + description: "" + "400": + description: Invalid request + security: + - bearer: [] + summary: Generate a summary for a markdown supported blog + tags: + - Blog summary service + /v1/stripe/webhooks: + post: + operationId: handleStripeWebhook + parameters: [] + responses: + "200": + description: "" + "201": + description: "" + tags: + - Stripe service + /v1/highlights/list: + get: + operationId: findAllHighlights + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 10 + maximum: 1000 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: orderDirection + required: false + schema: + $ref: '#/components/schemas/OrderDirectionEnum' + style: form + - description: Range in days + explode: true + in: query + name: range + required: false + schema: + default: 30 + type: integer + style: form + - description: Highlight Repo Filter + example: open-sauced/insights + explode: true + in: query + name: repo + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/findAllHighlightsByUsername_200_response' + description: Successfully received model list + summary: Finds all highlights and paginates them + tags: + - Highlights service + /v1/highlights/featured: + get: + operationId: findAllFeaturedHighlights + parameters: + - explode: true + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 10 + maximum: 1000 + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: orderDirection + required: false + schema: + $ref: '#/components/schemas/OrderDirectionEnum' + style: form + - description: Range in days + explode: true + in: query + name: range + required: false + schema: + default: 30 + type: integer + style: form + - description: Highlight Repo Filter + example: open-sauced/insights + explode: true + in: query + name: repo + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/findAllHighlightsByUsername_200_response' + description: Successfully received model list + summary: Finds all featured highlights and paginates them + tags: + - Highlights service + /v1/highlights/{id}/featured: + delete: + operationId: removeAFeaturedHighlight + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DbUserHighlight' + description: "" + "400": + description: Invalid request + "404": + description: Unable to find highlight + security: + - bearer: [] + summary: Remove a highlight from the featured list + tags: + - Highlights service + post: + operationId: addAFeaturedHighlight + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DbUserHighlight' + description: "" + "201": + content: + application/json: + schema: type: object description: "" "400": @@ -3955,127 +4352,27 @@ paths: default: 30 type: integer style: form - - explode: true - in: query - name: repoIds - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/searchAllPullRequestContributors_200_response' - description: Successfully received model list - summary: Gets all recent churned contributors for the last 30 days based on - repo IDs - tags: - - Contributors service - /v1/contributors/insights/repeat: - get: - operationId: findAllRepeatPullRequestContributors - parameters: - - explode: true - in: query - name: page - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - explode: true - in: query - name: limit - required: false - schema: - default: 10 - maximum: 1000 - minimum: 1 - type: integer - style: form - - explode: true - in: query - name: orderDirection - required: false - schema: - $ref: '#/components/schemas/OrderDirectionEnum' - style: form - - description: Range in days - explode: true - in: query - name: range - required: false - schema: - default: 30 - type: integer - style: form - - explode: true - in: query - name: repoIds - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/searchAllPullRequestContributors_200_response' - description: Successfully received model list - summary: Gets all recent repeat contributors for the last 30 days based on repo - IDs - tags: - - Contributors service - /v1/bake: - post: - operationId: Bake a repository with the pizza oven microservice - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BakeRepoDto' - required: true - responses: - "201": - description: "" - "202": - description: "" - "400": - description: Invalid request - summary: postToPizzaOvenService - tags: - - Pizza oven service - /v1/bake/repos/{id}: - get: - operationId: findBakedRepoById - parameters: - - explode: false - in: path - name: id - required: true + - explode: true + in: query + name: repoIds + required: false schema: - type: integer - style: simple + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DbBakedRepo' - description: "" - "404": - description: Baked repository not found - summary: Finds a baked repo by :id + $ref: '#/components/schemas/searchAllPullRequestContributors_200_response' + description: Successfully received model list + summary: Gets all recent churned contributors for the last 30 days based on + repo IDs tags: - - Pizza oven service - /v1/bake/repos/list: + - Contributors service + /v1/contributors/insights/repeat: get: - operationId: listAllBakedRepos + operationId: findAllRepeatPullRequestContributors parameters: - explode: true in: query @@ -4112,42 +4409,27 @@ paths: default: 30 type: integer style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/listAllBakedRepos_200_response' - description: Successfully received model list - summary: Finds all baked repos and paginates them - tags: - - Pizza oven service - /v1/bake/commit-authors/{id}: - get: - operationId: findCommitAuthorById - parameters: - - explode: false - in: path - name: id - required: true + - explode: true + in: query + name: repoIds + required: false schema: - type: integer - style: simple + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DbCommitAuthors' - description: "" - "404": - description: Commit author not found - summary: Finds a commit author by :id + $ref: '#/components/schemas/searchAllPullRequestContributors_200_response' + description: Successfully received model list + summary: Gets all recent repeat contributors for the last 30 days based on repo + IDs tags: - - Pizza oven service - /v1/bake/commit-authors/list: + - Contributors service + /v1/lists: get: - operationId: listAllCommitAuthors + operationId: getListsForUser parameters: - explode: true in: query @@ -4189,37 +4471,132 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/listAllCommitAuthors_200_response' - description: Successfully received model list - summary: Finds all commit authors and paginates them + $ref: '#/components/schemas/DbUserList' + description: "" + "400": + description: Invalid request + "404": + description: Unable to get user lists + security: + - bearer: [] + summary: Gets lists for the authenticated user tags: - - Pizza oven service - /v1/bake/commits/{id}: + - User Lists service + post: + operationId: addListForUser + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserListDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DbUserList' + description: "" + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DbUserList' + description: "" + "400": + description: Invalid request + "404": + description: Unable to add user list + security: + - bearer: [] + summary: Adds a new list for the authenticated user + tags: + - User Lists service + /v1/lists/{id}: + delete: + operationId: deleteListForUser + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + description: "" + "400": + description: Invalid request + "404": + description: Unable to delete user list + security: + - bearer: [] + summary: Deletes the list for the authenticated user + tags: + - User Lists service get: - operationId: findCommitById + operationId: getUserList parameters: - explode: false in: path name: id required: true schema: - type: integer + type: string style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DbCommits' + $ref: '#/components/schemas/DbUserList' description: "" + "400": + description: Invalid request "404": - description: Commit not found - summary: Finds a commit by :id + description: Unable to get user list + security: + - bearer: [] + summary: Retrieves an individual user list tags: - - Pizza oven service - /v1/bake/commits/list/repo/{id}: + - User Lists service + patch: + operationId: updateListForUser + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserListDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DbUserList' + description: "" + "400": + description: Invalid request + "404": + description: Unable to update user list + security: + - bearer: [] + summary: Updates the list for the authenticated user + tags: + - User Lists service + /v1/lists/contributors: get: - operationId: listAllCommitsByBakedRepoId + operationId: getContributors parameters: - explode: true in: query @@ -4240,42 +4617,51 @@ paths: minimum: 1 type: integer style: form - - explode: true + - example: "Denver, Colorado" + explode: true in: query - name: orderDirection + name: location required: false schema: - $ref: '#/components/schemas/OrderDirectionEnum' + type: string style: form - - description: Range in days + - example: Mountain Standard Time explode: true in: query - name: range + name: timezone required: false schema: - default: 30 - type: integer + type: string style: form - - explode: false - in: path - name: id - required: true + - description: Less than or equal to the average number of days to merge a PR + over the last 30 days + example: 2 + explode: true + in: query + name: pr_velocity + required: false schema: type: integer - style: simple + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/listAllCommitsByBakedRepoId_200_response' + $ref: '#/components/schemas/getContributors_200_response' description: Successfully received model list - summary: Finds all commits by baked repo :id and paginates them + "400": + description: Invalid request + "404": + description: Unable to get contributors + security: + - bearer: [] + summary: Retrieves paginated contributors tags: - - Pizza oven service - /v1/bake/commits/list/commit-author/{id}: + - User Lists service + /v1/lists/{id}/contributors: get: - operationId: listAllCommitsByCommitAuthorId + operationId: getUserListContributors parameters: - explode: true in: query @@ -4317,18 +4703,88 @@ paths: name: id required: true schema: - type: integer + type: string style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/listAllCommitsByBakedRepoId_200_response' + $ref: '#/components/schemas/getUserListContributors_200_response' description: Successfully received model list - summary: Finds all commits by commit author :id and paginates them + "400": + description: Invalid request + "404": + description: Unable to get user list contributors + security: + - bearer: [] + summary: Retrieves contributors for an individual user list tags: - - Pizza oven service + - User Lists service + post: + operationId: postUserListContributors + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CollaboratorsDto' + required: true + responses: + "201": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/DbUserListContributor' + type: array + description: "" + "400": + description: Invalid request + "404": + description: Unable to add to user list contributors + security: + - bearer: [] + summary: Add new contributors to an individual user list + tags: + - User Lists service + /v1/lists/{id}/contributors/{userListContributorId}: + delete: + operationId: deleteUserListContributor + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: userListContributorId + required: true + schema: + type: integer + style: simple + responses: + "200": + description: "" + "400": + description: Invalid request + "404": + description: Unable to delete user from user list contributors + security: + - bearer: [] + summary: Delete contributor from an individual user list + tags: + - User Lists service components: schemas: SupabaseAuthDto: @@ -5017,6 +5473,10 @@ components: description: Pull request repo full name example: open-sauced/insights type: string + commits: + description: Number of commits in the PR + example: 4 + type: integer required: - author_avatar - author_login @@ -5412,14 +5872,30 @@ components: - user_id - watchers type: object - DbTopUser: + DbTopUser: + example: + login: bdougie + properties: + login: + description: Top User Login + example: bdougie + type: string + type: object + DbFilteredUser: example: + full_name: Brian Douglas login: bdougie properties: login: - description: Top User Login + description: User Login example: bdougie type: string + full_name: + description: Users fullname + example: Brian Douglas + type: string + required: + - full_name type: object CreateUserHighlightDto: example: @@ -5779,7 +6255,7 @@ components: interval: 1 id: 71359796 accepted_prs: 287 - day: 2022-08-28 22:04:39.000000 + day: 2022-08-28T00:00:00.000+00:00 spam_prs: 287 properties: id: @@ -5794,8 +6270,9 @@ components: type: integer day: description: Selected interval computed date in human readable format - example: 2022-08-28 22:04:39.000000 - type: date-time + example: 2022-08-28 + format: date + type: string all_prs: description: "PR Type: all requests count" example: 287 @@ -6362,6 +6839,92 @@ components: required: - access type: object + BakeRepoDto: + example: + wait: false + url: https://github.com/open-sauced/insights + properties: + url: + description: Repo clone URL + example: https://github.com/open-sauced/insights + type: string + wait: + description: Option to wait for Pizza service to finish baking repo + example: false + type: boolean + required: + - url + - wait + type: object + DbBakedRepo: + example: + repo_id: 12345678 + clone_url: https://github.com/open-sauced/insights.git + id: 71359796 + properties: + id: + description: Baked repository identifier + example: 71359796 + type: integer + clone_url: + description: Repository clone url + example: https://github.com/open-sauced/insights.git + type: string + repo_id: + description: Repository identifier + example: 12345678 + type: integer + required: + - clone_url + - id + - repo_id + type: object + DbCommitAuthors: + example: + id: 71359796 + properties: + id: + description: Commit author identifier + example: 71359796 + type: integer + required: + - id + type: object + DbCommits: + example: + commit_date: 5e7c6c7af42d38c57f363c564c58007da448c443 + commit_author_id: 9876543 + baked_repo_id: 57568598 + id: 71359796 + commit_hash: 5e7c6c7af42d38c57f363c564c58007da448c443 + properties: + id: + description: Commit identifier + example: 71359796 + type: integer + commit_hash: + description: Hash for the commit + example: 5e7c6c7af42d38c57f363c564c58007da448c443 + type: string + commit_date: + description: Date for the commit + example: 5e7c6c7af42d38c57f363c564c58007da448c443 + type: string + baked_repo_id: + description: Baked repo identifier + example: 57568598 + type: integer + commit_author_id: + description: Commit author identifier + example: 9876543 + type: integer + required: + - baked_repo_id + - commit_author_id + - commit_date + - commit_hash + - id + type: object CreateIssueSummaryDto: example: tone: formal @@ -6532,91 +7095,128 @@ components: required: - author_login type: object - BakeRepoDto: + DbUserList: example: - wait: false - url: https://github.com/open-sauced/insights + updated_at: 2000-01-23T04:56:07.000+00:00 + user_id: 237133 + name: JavaScript Developers + is_public: false + created_at: 2000-01-23T04:56:07.000+00:00 + id: uuid-v4 + deleted_at: 2000-01-23T04:56:07.000+00:00 properties: - url: - description: Repo clone URL - example: https://github.com/open-sauced/insights + id: + description: User List identifier + example: uuid-v4 type: string - wait: - description: Option to wait for Pizza service to finish baking repo + user_id: + description: User ID + example: 237133 + type: integer + name: + description: List Name + example: JavaScript Developers + type: string + is_public: + description: Flag indicating insight visibility example: false type: boolean + created_at: + description: Timestamp representing insight creation + format: date-time + type: string + updated_at: + description: Timestamp representing insight last updated + format: date-time + type: string + deleted_at: + description: Timestamp representing insight deletion + format: date-time + type: string required: - - url - - wait + - id + - is_public + - name + - user_id type: object - DbBakedRepo: + CreateUserListDto: example: - repo_id: 12345678 - clone_url: https://github.com/open-sauced/insights.git - id: 71359796 + name: My List + is_public: false + contributors: + - 42211 + - 81233 properties: - id: - description: Baked repository identifier - example: 71359796 - type: integer - clone_url: - description: Repository clone url - example: https://github.com/open-sauced/insights.git + name: + description: List Name + example: My List type: string - repo_id: - description: Repository identifier - example: 12345678 - type: integer + is_public: + description: List Visibility + example: false + type: boolean + contributors: + description: An array of contributor user IDs + example: + - 42211 + - 81233 + items: + type: integer + type: array required: - - clone_url - - id - - repo_id + - contributors + - is_public + - name type: object - DbCommitAuthors: + DbUserListContributor: example: - id: 71359796 + list_id: uuid-v4 + user_id: 237133 + created_at: 2000-01-23T04:56:07.000+00:00 + id: uuid-v4 + login: bdougie properties: id: - description: Commit author identifier - example: 71359796 + description: User list contributor identifier + example: uuid-v4 + type: string + user_id: + description: User identifier + example: 237133 type: integer + list_id: + description: List identifier + example: uuid-v4 + type: string + created_at: + description: Timestamp representing top repo first index + format: date-time + type: string + login: + description: User list collaborator's login + example: bdougie + type: string required: - id + - list_id + - user_id type: object - DbCommits: + CollaboratorsDto: example: - commit_date: 5e7c6c7af42d38c57f363c564c58007da448c443 - commit_author_id: 9876543 - baked_repo_id: 57568598 - id: 71359796 - commit_hash: 5e7c6c7af42d38c57f363c564c58007da448c443 + contributors: + - 42211 + - 81233 properties: - id: - description: Commit identifier - example: 71359796 - type: integer - commit_hash: - description: Hash for the commit - example: 5e7c6c7af42d38c57f363c564c58007da448c443 - type: string - commit_date: - description: Date for the commit - example: 5e7c6c7af42d38c57f363c564c58007da448c443 - type: string - baked_repo_id: - description: Baked repo identifier - example: 57568598 - type: integer - commit_author_id: - description: Commit author identifier - example: 9876543 - type: integer + contributors: + description: An array of contributor user IDs + example: + - 42211 + - 81233 + items: + type: integer + type: array required: - - baked_repo_id - - commit_author_id - - commit_date - - commit_hash - - id + - contributors type: object findContributorPullRequests_200_response: allOf: @@ -6758,53 +7358,69 @@ components: items: $ref: '#/components/schemas/DbInsightMember' type: array - findAllHighlightRepos_200_response: + listAllBakedRepos_200_response: allOf: - $ref: '#/components/schemas/PageDto' - properties: data: items: - $ref: '#/components/schemas/DbUserHighlightRepo' + $ref: '#/components/schemas/DbBakedRepo' type: array - findAllEmojis_200_response: + listAllCommitAuthors_200_response: allOf: - $ref: '#/components/schemas/PageDto' - properties: data: items: - $ref: '#/components/schemas/DbEmoji' + $ref: '#/components/schemas/DbCommitAuthors' type: array - searchAllPullRequestContributors_200_response: + listAllCommitsByBakedRepoId_200_response: allOf: - $ref: '#/components/schemas/PageDto' - properties: data: items: - $ref: '#/components/schemas/DbPullRequestContributor' + $ref: '#/components/schemas/DbCommits' type: array - listAllBakedRepos_200_response: + findAllHighlightRepos_200_response: allOf: - $ref: '#/components/schemas/PageDto' - properties: data: items: - $ref: '#/components/schemas/DbBakedRepo' + $ref: '#/components/schemas/DbUserHighlightRepo' type: array - listAllCommitAuthors_200_response: + findAllEmojis_200_response: allOf: - $ref: '#/components/schemas/PageDto' - properties: data: items: - $ref: '#/components/schemas/DbCommitAuthors' + $ref: '#/components/schemas/DbEmoji' type: array - listAllCommitsByBakedRepoId_200_response: + searchAllPullRequestContributors_200_response: allOf: - $ref: '#/components/schemas/PageDto' - properties: data: items: - $ref: '#/components/schemas/DbCommits' + $ref: '#/components/schemas/DbPullRequestContributor' + type: array + getContributors_200_response: + allOf: + - $ref: '#/components/schemas/PageDto' + - properties: + data: + items: + $ref: '#/components/schemas/DbUser' + type: array + getUserListContributors_200_response: + allOf: + - $ref: '#/components/schemas/PageDto' + - properties: + data: + items: + $ref: '#/components/schemas/DbUserListContributor' type: array securitySchemes: bearer: diff --git a/client/api_user_lists_service.go b/client/api_user_lists_service.go new file mode 100644 index 0000000..e9922d6 --- /dev/null +++ b/client/api_user_lists_service.go @@ -0,0 +1,1063 @@ +/* +@open-sauced/api.opensauced.pizza + + ## Swagger-UI API Documentation This REST API can be used to create, read, update or delete data from the Open Sauced community platform. The Swagger-UI provides useful information to get started and an overview of all available resources. Each API route is clickable and has their own detailed description on how to use it. The base URL for the API is [api.opensauced.pizza](https://api.opensauced.pizza). [comment]: # (TODO: add bearer auth information) ## Rate limiting Every IP address is allowed to perform 5000 requests per hour. This is measured by saving the date of the initial request and counting all requests in the next hour. When an IP address goes over the limit, HTTP status code 429 is returned. The returned HTTP headers of any API request show the current rate limit status: header | description --- | --- `X-RateLimit-Limit` | The maximum number of requests allowed per hour `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window `X-RateLimit-Reset` | The date and time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time) [comment]: # (TODO: add pagination information) ## Common response codes Each route shows for each method which data they expect and which they will respond when the call succeeds. The table below shows most common response codes you can receive from our endpoints. code | condition --- | --- [`200`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) | The [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request was handled successfully. The response provides the requested data. [`201`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201) | The [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request was handled successfully. The response provides the created data. [`204`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204) | The [`PATCH`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) or [`DELETE`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request was handled successfully. The response provides no data, generally. [`400`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) | The server will not process the request due to something that is perceived to be a client error. Check the provided error for mote information. [`401`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) | The request requires user authentication. Check the provided error for more information. [`403`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) | The request was valid, but the server is refusing user access. Check the provided error for more information. [`404`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) | The requested resource could not be found. Check the provided error for more information. [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) | The current API Key made too many requests in the last hour. Check [Rate limiting](#ratelimiting) for more information. ## Additional links + +API version: 1 +Contact: hello@opensauced.pizza +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// UserListsServiceAPIService UserListsServiceAPI service +type UserListsServiceAPIService service + +type ApiAddListForUserRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + createUserListDto *CreateUserListDto +} + +func (r ApiAddListForUserRequest) CreateUserListDto(createUserListDto CreateUserListDto) ApiAddListForUserRequest { + r.createUserListDto = &createUserListDto + return r +} + +func (r ApiAddListForUserRequest) Execute() (*DbUserList, *http.Response, error) { + return r.ApiService.AddListForUserExecute(r) +} + +/* +AddListForUser Adds a new list for the authenticated user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddListForUserRequest +*/ +func (a *UserListsServiceAPIService) AddListForUser(ctx context.Context) ApiAddListForUserRequest { + return ApiAddListForUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DbUserList +func (a *UserListsServiceAPIService) AddListForUserExecute(r ApiAddListForUserRequest) (*DbUserList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DbUserList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.AddListForUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createUserListDto == nil { + return localVarReturnValue, nil, reportError("createUserListDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createUserListDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteListForUserRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + id string +} + +func (r ApiDeleteListForUserRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteListForUserExecute(r) +} + +/* +DeleteListForUser Deletes the list for the authenticated user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiDeleteListForUserRequest +*/ +func (a *UserListsServiceAPIService) DeleteListForUser(ctx context.Context, id string) ApiDeleteListForUserRequest { + return ApiDeleteListForUserRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *UserListsServiceAPIService) DeleteListForUserExecute(r ApiDeleteListForUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.DeleteListForUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteUserListContributorRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + id string + userListContributorId int32 +} + +func (r ApiDeleteUserListContributorRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteUserListContributorExecute(r) +} + +/* +DeleteUserListContributor Delete contributor from an individual user list + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @param userListContributorId + @return ApiDeleteUserListContributorRequest +*/ +func (a *UserListsServiceAPIService) DeleteUserListContributor(ctx context.Context, id string, userListContributorId int32) ApiDeleteUserListContributorRequest { + return ApiDeleteUserListContributorRequest{ + ApiService: a, + ctx: ctx, + id: id, + userListContributorId: userListContributorId, + } +} + +// Execute executes the request +func (a *UserListsServiceAPIService) DeleteUserListContributorExecute(r ApiDeleteUserListContributorRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.DeleteUserListContributor") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists/{id}/contributors/{userListContributorId}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userListContributorId"+"}", url.PathEscape(parameterValueToString(r.userListContributorId, "userListContributorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetContributorsRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + page *int32 + limit *int32 + location *string + timezone *string + prVelocity *int32 +} + +func (r ApiGetContributorsRequest) Page(page int32) ApiGetContributorsRequest { + r.page = &page + return r +} + +func (r ApiGetContributorsRequest) Limit(limit int32) ApiGetContributorsRequest { + r.limit = &limit + return r +} + +func (r ApiGetContributorsRequest) Location(location string) ApiGetContributorsRequest { + r.location = &location + return r +} + +func (r ApiGetContributorsRequest) Timezone(timezone string) ApiGetContributorsRequest { + r.timezone = &timezone + return r +} + +// Less than or equal to the average number of days to merge a PR over the last 30 days +func (r ApiGetContributorsRequest) PrVelocity(prVelocity int32) ApiGetContributorsRequest { + r.prVelocity = &prVelocity + return r +} + +func (r ApiGetContributorsRequest) Execute() (*GetContributors200Response, *http.Response, error) { + return r.ApiService.GetContributorsExecute(r) +} + +/* +GetContributors Retrieves paginated contributors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetContributorsRequest +*/ +func (a *UserListsServiceAPIService) GetContributors(ctx context.Context) ApiGetContributorsRequest { + return ApiGetContributorsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GetContributors200Response +func (a *UserListsServiceAPIService) GetContributorsExecute(r ApiGetContributorsRequest) (*GetContributors200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetContributors200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.GetContributors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists/contributors" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.location != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "location", r.location, "") + } + if r.timezone != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "timezone", r.timezone, "") + } + if r.prVelocity != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pr_velocity", r.prVelocity, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetListsForUserRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + page *int32 + limit *int32 + orderDirection *OrderDirectionEnum + range_ *int32 +} + +func (r ApiGetListsForUserRequest) Page(page int32) ApiGetListsForUserRequest { + r.page = &page + return r +} + +func (r ApiGetListsForUserRequest) Limit(limit int32) ApiGetListsForUserRequest { + r.limit = &limit + return r +} + +func (r ApiGetListsForUserRequest) OrderDirection(orderDirection OrderDirectionEnum) ApiGetListsForUserRequest { + r.orderDirection = &orderDirection + return r +} + +// Range in days +func (r ApiGetListsForUserRequest) Range_(range_ int32) ApiGetListsForUserRequest { + r.range_ = &range_ + return r +} + +func (r ApiGetListsForUserRequest) Execute() (*DbUserList, *http.Response, error) { + return r.ApiService.GetListsForUserExecute(r) +} + +/* +GetListsForUser Gets lists for the authenticated user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetListsForUserRequest +*/ +func (a *UserListsServiceAPIService) GetListsForUser(ctx context.Context) ApiGetListsForUserRequest { + return ApiGetListsForUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DbUserList +func (a *UserListsServiceAPIService) GetListsForUserExecute(r ApiGetListsForUserRequest) (*DbUserList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DbUserList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.GetListsForUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.orderDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "orderDirection", r.orderDirection, "") + } + if r.range_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "range", r.range_, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserListRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + id string +} + +func (r ApiGetUserListRequest) Execute() (*DbUserList, *http.Response, error) { + return r.ApiService.GetUserListExecute(r) +} + +/* +GetUserList Retrieves an individual user list + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetUserListRequest +*/ +func (a *UserListsServiceAPIService) GetUserList(ctx context.Context, id string) ApiGetUserListRequest { + return ApiGetUserListRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DbUserList +func (a *UserListsServiceAPIService) GetUserListExecute(r ApiGetUserListRequest) (*DbUserList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DbUserList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.GetUserList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserListContributorsRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + id string + page *int32 + limit *int32 + orderDirection *OrderDirectionEnum + range_ *int32 +} + +func (r ApiGetUserListContributorsRequest) Page(page int32) ApiGetUserListContributorsRequest { + r.page = &page + return r +} + +func (r ApiGetUserListContributorsRequest) Limit(limit int32) ApiGetUserListContributorsRequest { + r.limit = &limit + return r +} + +func (r ApiGetUserListContributorsRequest) OrderDirection(orderDirection OrderDirectionEnum) ApiGetUserListContributorsRequest { + r.orderDirection = &orderDirection + return r +} + +// Range in days +func (r ApiGetUserListContributorsRequest) Range_(range_ int32) ApiGetUserListContributorsRequest { + r.range_ = &range_ + return r +} + +func (r ApiGetUserListContributorsRequest) Execute() (*GetUserListContributors200Response, *http.Response, error) { + return r.ApiService.GetUserListContributorsExecute(r) +} + +/* +GetUserListContributors Retrieves contributors for an individual user list + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetUserListContributorsRequest +*/ +func (a *UserListsServiceAPIService) GetUserListContributors(ctx context.Context, id string) ApiGetUserListContributorsRequest { + return ApiGetUserListContributorsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return GetUserListContributors200Response +func (a *UserListsServiceAPIService) GetUserListContributorsExecute(r ApiGetUserListContributorsRequest) (*GetUserListContributors200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetUserListContributors200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.GetUserListContributors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists/{id}/contributors" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.orderDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "orderDirection", r.orderDirection, "") + } + if r.range_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "range", r.range_, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPostUserListContributorsRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + id string + collaboratorsDto *CollaboratorsDto +} + +func (r ApiPostUserListContributorsRequest) CollaboratorsDto(collaboratorsDto CollaboratorsDto) ApiPostUserListContributorsRequest { + r.collaboratorsDto = &collaboratorsDto + return r +} + +func (r ApiPostUserListContributorsRequest) Execute() ([]DbUserListContributor, *http.Response, error) { + return r.ApiService.PostUserListContributorsExecute(r) +} + +/* +PostUserListContributors Add new contributors to an individual user list + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiPostUserListContributorsRequest +*/ +func (a *UserListsServiceAPIService) PostUserListContributors(ctx context.Context, id string) ApiPostUserListContributorsRequest { + return ApiPostUserListContributorsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return []DbUserListContributor +func (a *UserListsServiceAPIService) PostUserListContributorsExecute(r ApiPostUserListContributorsRequest) ([]DbUserListContributor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DbUserListContributor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.PostUserListContributors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists/{id}/contributors" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.collaboratorsDto == nil { + return localVarReturnValue, nil, reportError("collaboratorsDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.collaboratorsDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateListForUserRequest struct { + ctx context.Context + ApiService *UserListsServiceAPIService + id string + createUserListDto *CreateUserListDto +} + +func (r ApiUpdateListForUserRequest) CreateUserListDto(createUserListDto CreateUserListDto) ApiUpdateListForUserRequest { + r.createUserListDto = &createUserListDto + return r +} + +func (r ApiUpdateListForUserRequest) Execute() (*DbUserList, *http.Response, error) { + return r.ApiService.UpdateListForUserExecute(r) +} + +/* +UpdateListForUser Updates the list for the authenticated user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiUpdateListForUserRequest +*/ +func (a *UserListsServiceAPIService) UpdateListForUser(ctx context.Context, id string) ApiUpdateListForUserRequest { + return ApiUpdateListForUserRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return DbUserList +func (a *UserListsServiceAPIService) UpdateListForUserExecute(r ApiUpdateListForUserRequest) (*DbUserList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DbUserList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserListsServiceAPIService.UpdateListForUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/lists/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createUserListDto == nil { + return localVarReturnValue, nil, reportError("createUserListDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createUserListDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/client/api_user_recommendations_service.go b/client/api_user_recommendations_service.go index 91238bb..382f79b 100644 --- a/client/api_user_recommendations_service.go +++ b/client/api_user_recommendations_service.go @@ -22,12 +22,147 @@ import ( // UserRecommendationsServiceAPIService UserRecommendationsServiceAPI service type UserRecommendationsServiceAPIService service +type ApiFindUserOrgsRepoRecommendationsRequest struct { + ctx context.Context + ApiService *UserRecommendationsServiceAPIService + page *int32 + limit *int32 + orderDirection *OrderDirectionEnum + range_ *int32 +} + +func (r ApiFindUserOrgsRepoRecommendationsRequest) Page(page int32) ApiFindUserOrgsRepoRecommendationsRequest { + r.page = &page + return r +} + +func (r ApiFindUserOrgsRepoRecommendationsRequest) Limit(limit int32) ApiFindUserOrgsRepoRecommendationsRequest { + r.limit = &limit + return r +} + +func (r ApiFindUserOrgsRepoRecommendationsRequest) OrderDirection(orderDirection OrderDirectionEnum) ApiFindUserOrgsRepoRecommendationsRequest { + r.orderDirection = &orderDirection + return r +} + +// Range in days +func (r ApiFindUserOrgsRepoRecommendationsRequest) Range_(range_ int32) ApiFindUserOrgsRepoRecommendationsRequest { + r.range_ = &range_ + return r +} + +func (r ApiFindUserOrgsRepoRecommendationsRequest) Execute() (*FindAllTopReposByUsername200Response, *http.Response, error) { + return r.ApiService.FindUserOrgsRepoRecommendationsExecute(r) +} + +/* +FindUserOrgsRepoRecommendations Listing recommended repos for the authenticated user based on their orgs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFindUserOrgsRepoRecommendationsRequest +*/ +func (a *UserRecommendationsServiceAPIService) FindUserOrgsRepoRecommendations(ctx context.Context) ApiFindUserOrgsRepoRecommendationsRequest { + return ApiFindUserOrgsRepoRecommendationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return FindAllTopReposByUsername200Response +func (a *UserRecommendationsServiceAPIService) FindUserOrgsRepoRecommendationsExecute(r ApiFindUserOrgsRepoRecommendationsRequest) (*FindAllTopReposByUsername200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FindAllTopReposByUsername200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserRecommendationsServiceAPIService.FindUserOrgsRepoRecommendations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/user/recommendations/orgs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.orderDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "orderDirection", r.orderDirection, "") + } + if r.range_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "range", r.range_, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiFindUserRepoRecommendationsRequest struct { ctx context.Context ApiService *UserRecommendationsServiceAPIService } -func (r ApiFindUserRepoRecommendationsRequest) Execute() (*http.Response, error) { +func (r ApiFindUserRepoRecommendationsRequest) Execute() (*FindAllTopReposByUsername200Response, *http.Response, error) { return r.ApiService.FindUserRepoRecommendationsExecute(r) } @@ -45,16 +180,19 @@ func (a *UserRecommendationsServiceAPIService) FindUserRepoRecommendations(ctx c } // Execute executes the request -func (a *UserRecommendationsServiceAPIService) FindUserRepoRecommendationsExecute(r ApiFindUserRepoRecommendationsRequest) (*http.Response, error) { +// +// @return FindAllTopReposByUsername200Response +func (a *UserRecommendationsServiceAPIService) FindUserRepoRecommendationsExecute(r ApiFindUserRepoRecommendationsRequest) (*FindAllTopReposByUsername200Response, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FindAllTopReposByUsername200Response ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserRecommendationsServiceAPIService.FindUserRepoRecommendations") if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/v1/user/recommendations/repos" @@ -73,7 +211,7 @@ func (a *UserRecommendationsServiceAPIService) FindUserRepoRecommendationsExecut } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -82,19 +220,19 @@ func (a *UserRecommendationsServiceAPIService) FindUserRepoRecommendationsExecut } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -102,8 +240,17 @@ func (a *UserRecommendationsServiceAPIService) FindUserRepoRecommendationsExecut body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/client/api_user_service.go b/client/api_user_service.go index b2d1ec5..636b02f 100644 --- a/client/api_user_service.go +++ b/client/api_user_service.go @@ -1007,6 +1007,133 @@ func (a *UserServiceAPIService) GetUserNotificationsExecute(r ApiGetUserNotifica return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetUsersByFilterRequest struct { + ctx context.Context + ApiService *UserServiceAPIService + username *string + page *int32 + limit *int32 +} + +// Username search query to filter from the list of users +func (r ApiGetUsersByFilterRequest) Username(username string) ApiGetUsersByFilterRequest { + r.username = &username + return r +} + +func (r ApiGetUsersByFilterRequest) Page(page int32) ApiGetUsersByFilterRequest { + r.page = &page + return r +} + +func (r ApiGetUsersByFilterRequest) Limit(limit int32) ApiGetUsersByFilterRequest { + r.limit = &limit + return r +} + +func (r ApiGetUsersByFilterRequest) Execute() (*DbFilteredUser, *http.Response, error) { + return r.ApiService.GetUsersByFilterExecute(r) +} + +/* +GetUsersByFilter Search users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetUsersByFilterRequest +*/ +func (a *UserServiceAPIService) GetUsersByFilter(ctx context.Context) ApiGetUsersByFilterRequest { + return ApiGetUsersByFilterRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return DbFilteredUser +func (a *UserServiceAPIService) GetUsersByFilterExecute(r ApiGetUsersByFilterRequest) (*DbFilteredUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DbFilteredUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserServiceAPIService.GetUsersByFilter") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/users/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.username == nil { + return localVarReturnValue, nil, reportError("username is required and must be specified") + } + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "username", r.username, "") + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiUnfollowUserByUsernameRequest struct { ctx context.Context ApiService *UserServiceAPIService diff --git a/client/client.go b/client/client.go index dd07881..13987e2 100644 --- a/client/client.go +++ b/client/client.go @@ -87,6 +87,8 @@ type APIClient struct { UserHighlightsServiceAPI *UserHighlightsServiceAPIService + UserListsServiceAPI *UserListsServiceAPIService + UserRecommendationsServiceAPI *UserRecommendationsServiceAPIService UserServiceAPI *UserServiceAPIService @@ -129,6 +131,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.SubmitServiceAPI = (*SubmitServiceAPIService)(&c.common) c.UserCollaborationsServiceAPI = (*UserCollaborationsServiceAPIService)(&c.common) c.UserHighlightsServiceAPI = (*UserHighlightsServiceAPIService)(&c.common) + c.UserListsServiceAPI = (*UserListsServiceAPIService)(&c.common) c.UserRecommendationsServiceAPI = (*UserRecommendationsServiceAPIService)(&c.common) c.UserServiceAPI = (*UserServiceAPIService)(&c.common) c.VoteServiceAPI = (*VoteServiceAPIService)(&c.common) diff --git a/client/configuration.go b/client/configuration.go index 3c69543..c28a602 100644 --- a/client/configuration.go +++ b/client/configuration.go @@ -93,10 +93,6 @@ func NewConfiguration() *Configuration { UserAgent: "OpenAPI-Generator/1.0.0/go", Debug: false, Servers: ServerConfigurations{ - { - URL: "http://localhost:3001", - Description: "Development", - }, { URL: "https://api.opensauced.pizza", Description: "Production", diff --git a/client/docs/AuthenticationServiceAPI.md b/client/docs/AuthenticationServiceAPI.md index ed2c8bc..6b09024 100644 --- a/client/docs/AuthenticationServiceAPI.md +++ b/client/docs/AuthenticationServiceAPI.md @@ -1,6 +1,6 @@ # \AuthenticationServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/BlogSummaryServiceAPI.md b/client/docs/BlogSummaryServiceAPI.md index 3456a11..e038224 100644 --- a/client/docs/BlogSummaryServiceAPI.md +++ b/client/docs/BlogSummaryServiceAPI.md @@ -1,6 +1,6 @@ # \BlogSummaryServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/CollaboratorsDto.md b/client/docs/CollaboratorsDto.md new file mode 100644 index 0000000..701ef59 --- /dev/null +++ b/client/docs/CollaboratorsDto.md @@ -0,0 +1,51 @@ +# CollaboratorsDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contributors** | **[]int32** | An array of contributor user IDs | + +## Methods + +### NewCollaboratorsDto + +`func NewCollaboratorsDto(contributors []int32, ) *CollaboratorsDto` + +NewCollaboratorsDto instantiates a new CollaboratorsDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCollaboratorsDtoWithDefaults + +`func NewCollaboratorsDtoWithDefaults() *CollaboratorsDto` + +NewCollaboratorsDtoWithDefaults instantiates a new CollaboratorsDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContributors + +`func (o *CollaboratorsDto) GetContributors() []int32` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *CollaboratorsDto) GetContributorsOk() (*[]int32, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *CollaboratorsDto) SetContributors(v []int32)` + +SetContributors sets Contributors field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/docs/ContributionServiceAPI.md b/client/docs/ContributionServiceAPI.md index 556b664..e182724 100644 --- a/client/docs/ContributionServiceAPI.md +++ b/client/docs/ContributionServiceAPI.md @@ -1,6 +1,6 @@ # \ContributionServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/ContributorsServiceAPI.md b/client/docs/ContributorsServiceAPI.md index d0b7669..6f8adb7 100644 --- a/client/docs/ContributorsServiceAPI.md +++ b/client/docs/ContributorsServiceAPI.md @@ -1,6 +1,6 @@ # \ContributorsServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/CreateUserListDto.md b/client/docs/CreateUserListDto.md new file mode 100644 index 0000000..7d01868 --- /dev/null +++ b/client/docs/CreateUserListDto.md @@ -0,0 +1,93 @@ +# CreateUserListDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | List Name | +**IsPublic** | **bool** | List Visibility | +**Contributors** | **[]int32** | An array of contributor user IDs | + +## Methods + +### NewCreateUserListDto + +`func NewCreateUserListDto(name string, isPublic bool, contributors []int32, ) *CreateUserListDto` + +NewCreateUserListDto instantiates a new CreateUserListDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateUserListDtoWithDefaults + +`func NewCreateUserListDtoWithDefaults() *CreateUserListDto` + +NewCreateUserListDtoWithDefaults instantiates a new CreateUserListDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CreateUserListDto) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateUserListDto) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateUserListDto) SetName(v string)` + +SetName sets Name field to given value. + + +### GetIsPublic + +`func (o *CreateUserListDto) GetIsPublic() bool` + +GetIsPublic returns the IsPublic field if non-nil, zero value otherwise. + +### GetIsPublicOk + +`func (o *CreateUserListDto) GetIsPublicOk() (*bool, bool)` + +GetIsPublicOk returns a tuple with the IsPublic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPublic + +`func (o *CreateUserListDto) SetIsPublic(v bool)` + +SetIsPublic sets IsPublic field to given value. + + +### GetContributors + +`func (o *CreateUserListDto) GetContributors() []int32` + +GetContributors returns the Contributors field if non-nil, zero value otherwise. + +### GetContributorsOk + +`func (o *CreateUserListDto) GetContributorsOk() (*[]int32, bool)` + +GetContributorsOk returns a tuple with the Contributors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContributors + +`func (o *CreateUserListDto) SetContributors(v []int32)` + +SetContributors sets Contributors field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/docs/DbFilteredUser.md b/client/docs/DbFilteredUser.md new file mode 100644 index 0000000..8a0578b --- /dev/null +++ b/client/docs/DbFilteredUser.md @@ -0,0 +1,77 @@ +# DbFilteredUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Login** | Pointer to **string** | User Login | [optional] +**FullName** | **string** | Users fullname | + +## Methods + +### NewDbFilteredUser + +`func NewDbFilteredUser(fullName string, ) *DbFilteredUser` + +NewDbFilteredUser instantiates a new DbFilteredUser object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDbFilteredUserWithDefaults + +`func NewDbFilteredUserWithDefaults() *DbFilteredUser` + +NewDbFilteredUserWithDefaults instantiates a new DbFilteredUser object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLogin + +`func (o *DbFilteredUser) GetLogin() string` + +GetLogin returns the Login field if non-nil, zero value otherwise. + +### GetLoginOk + +`func (o *DbFilteredUser) GetLoginOk() (*string, bool)` + +GetLoginOk returns a tuple with the Login field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogin + +`func (o *DbFilteredUser) SetLogin(v string)` + +SetLogin sets Login field to given value. + +### HasLogin + +`func (o *DbFilteredUser) HasLogin() bool` + +HasLogin returns a boolean if a field has been set. + +### GetFullName + +`func (o *DbFilteredUser) GetFullName() string` + +GetFullName returns the FullName field if non-nil, zero value otherwise. + +### GetFullNameOk + +`func (o *DbFilteredUser) GetFullNameOk() (*string, bool)` + +GetFullNameOk returns a tuple with the FullName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFullName + +`func (o *DbFilteredUser) SetFullName(v string)` + +SetFullName sets FullName field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/docs/DbPRInsight.md b/client/docs/DbPRInsight.md index d2d15dd..1d06767 100644 --- a/client/docs/DbPRInsight.md +++ b/client/docs/DbPRInsight.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **int32** | Repository identifier | **Interval** | **int32** | Selected interval in numerical days, goes back with number, 0 means today | [default to 0] -**Day** | [**DateTime**](date-time.md) | Selected interval computed date in human readable format | +**Day** | **string** | Selected interval computed date in human readable format | **AllPrs** | **int32** | PR Type: all requests count | **AcceptedPrs** | **int32** | PR Type: accepted requests count | **SpamPrs** | **int32** | PR Type: spam requests count | @@ -15,7 +15,7 @@ Name | Type | Description | Notes ### NewDbPRInsight -`func NewDbPRInsight(id int32, interval int32, day DateTime, allPrs int32, acceptedPrs int32, spamPrs int32, ) *DbPRInsight` +`func NewDbPRInsight(id int32, interval int32, day string, allPrs int32, acceptedPrs int32, spamPrs int32, ) *DbPRInsight` NewDbPRInsight instantiates a new DbPRInsight object This constructor will assign default values to properties that have it defined, @@ -72,20 +72,20 @@ SetInterval sets Interval field to given value. ### GetDay -`func (o *DbPRInsight) GetDay() DateTime` +`func (o *DbPRInsight) GetDay() string` GetDay returns the Day field if non-nil, zero value otherwise. ### GetDayOk -`func (o *DbPRInsight) GetDayOk() (*DateTime, bool)` +`func (o *DbPRInsight) GetDayOk() (*string, bool)` GetDayOk returns a tuple with the Day field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDay -`func (o *DbPRInsight) SetDay(v DateTime)` +`func (o *DbPRInsight) SetDay(v string)` SetDay sets Day field to given value. diff --git a/client/docs/DbPullRequest.md b/client/docs/DbPullRequest.md index e5fc29c..f039cdb 100644 --- a/client/docs/DbPullRequest.md +++ b/client/docs/DbPullRequest.md @@ -33,6 +33,7 @@ Name | Type | Description | Notes **Deletions** | Pointer to **int32** | PR lines deleted | [optional] **ChangedFiles** | Pointer to **int32** | PR files changed | [optional] **FullName** | Pointer to **string** | Pull request repo full name | [optional] +**Commits** | Pointer to **int32** | Number of commits in the PR | [optional] ## Methods @@ -728,6 +729,31 @@ SetFullName sets FullName field to given value. HasFullName returns a boolean if a field has been set. +### GetCommits + +`func (o *DbPullRequest) GetCommits() int32` + +GetCommits returns the Commits field if non-nil, zero value otherwise. + +### GetCommitsOk + +`func (o *DbPullRequest) GetCommitsOk() (*int32, bool)` + +GetCommitsOk returns a tuple with the Commits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommits + +`func (o *DbPullRequest) SetCommits(v int32)` + +SetCommits sets Commits field to given value. + +### HasCommits + +`func (o *DbPullRequest) HasCommits() bool` + +HasCommits returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/client/docs/DbUserList.md b/client/docs/DbUserList.md new file mode 100644 index 0000000..cb15784 --- /dev/null +++ b/client/docs/DbUserList.md @@ -0,0 +1,192 @@ +# DbUserList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | User List identifier | +**UserId** | **int32** | User ID | +**Name** | **string** | List Name | +**IsPublic** | **bool** | Flag indicating insight visibility | +**CreatedAt** | Pointer to **time.Time** | Timestamp representing insight creation | [optional] +**UpdatedAt** | Pointer to **time.Time** | Timestamp representing insight last updated | [optional] +**DeletedAt** | Pointer to **time.Time** | Timestamp representing insight deletion | [optional] + +## Methods + +### NewDbUserList + +`func NewDbUserList(id string, userId int32, name string, isPublic bool, ) *DbUserList` + +NewDbUserList instantiates a new DbUserList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDbUserListWithDefaults + +`func NewDbUserListWithDefaults() *DbUserList` + +NewDbUserListWithDefaults instantiates a new DbUserList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DbUserList) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DbUserList) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DbUserList) SetId(v string)` + +SetId sets Id field to given value. + + +### GetUserId + +`func (o *DbUserList) GetUserId() int32` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *DbUserList) GetUserIdOk() (*int32, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *DbUserList) SetUserId(v int32)` + +SetUserId sets UserId field to given value. + + +### GetName + +`func (o *DbUserList) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DbUserList) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DbUserList) SetName(v string)` + +SetName sets Name field to given value. + + +### GetIsPublic + +`func (o *DbUserList) GetIsPublic() bool` + +GetIsPublic returns the IsPublic field if non-nil, zero value otherwise. + +### GetIsPublicOk + +`func (o *DbUserList) GetIsPublicOk() (*bool, bool)` + +GetIsPublicOk returns a tuple with the IsPublic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPublic + +`func (o *DbUserList) SetIsPublic(v bool)` + +SetIsPublic sets IsPublic field to given value. + + +### GetCreatedAt + +`func (o *DbUserList) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DbUserList) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DbUserList) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DbUserList) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DbUserList) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DbUserList) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DbUserList) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DbUserList) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetDeletedAt + +`func (o *DbUserList) GetDeletedAt() time.Time` + +GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. + +### GetDeletedAtOk + +`func (o *DbUserList) GetDeletedAtOk() (*time.Time, bool)` + +GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeletedAt + +`func (o *DbUserList) SetDeletedAt(v time.Time)` + +SetDeletedAt sets DeletedAt field to given value. + +### HasDeletedAt + +`func (o *DbUserList) HasDeletedAt() bool` + +HasDeletedAt returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/docs/DbUserListContributor.md b/client/docs/DbUserListContributor.md new file mode 100644 index 0000000..ed38c56 --- /dev/null +++ b/client/docs/DbUserListContributor.md @@ -0,0 +1,145 @@ +# DbUserListContributor + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | User list contributor identifier | +**UserId** | **int32** | User identifier | +**ListId** | **string** | List identifier | +**CreatedAt** | Pointer to **time.Time** | Timestamp representing top repo first index | [optional] +**Login** | Pointer to **string** | User list collaborator's login | [optional] + +## Methods + +### NewDbUserListContributor + +`func NewDbUserListContributor(id string, userId int32, listId string, ) *DbUserListContributor` + +NewDbUserListContributor instantiates a new DbUserListContributor object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDbUserListContributorWithDefaults + +`func NewDbUserListContributorWithDefaults() *DbUserListContributor` + +NewDbUserListContributorWithDefaults instantiates a new DbUserListContributor object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DbUserListContributor) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DbUserListContributor) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DbUserListContributor) SetId(v string)` + +SetId sets Id field to given value. + + +### GetUserId + +`func (o *DbUserListContributor) GetUserId() int32` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *DbUserListContributor) GetUserIdOk() (*int32, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *DbUserListContributor) SetUserId(v int32)` + +SetUserId sets UserId field to given value. + + +### GetListId + +`func (o *DbUserListContributor) GetListId() string` + +GetListId returns the ListId field if non-nil, zero value otherwise. + +### GetListIdOk + +`func (o *DbUserListContributor) GetListIdOk() (*string, bool)` + +GetListIdOk returns a tuple with the ListId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetListId + +`func (o *DbUserListContributor) SetListId(v string)` + +SetListId sets ListId field to given value. + + +### GetCreatedAt + +`func (o *DbUserListContributor) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DbUserListContributor) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DbUserListContributor) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DbUserListContributor) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetLogin + +`func (o *DbUserListContributor) GetLogin() string` + +GetLogin returns the Login field if non-nil, zero value otherwise. + +### GetLoginOk + +`func (o *DbUserListContributor) GetLoginOk() (*string, bool)` + +GetLoginOk returns a tuple with the Login field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogin + +`func (o *DbUserListContributor) SetLogin(v string)` + +SetLogin sets Login field to given value. + +### HasLogin + +`func (o *DbUserListContributor) HasLogin() bool` + +HasLogin returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/docs/EmojisServiceAPI.md b/client/docs/EmojisServiceAPI.md index 9cfdfa0..61fee44 100644 --- a/client/docs/EmojisServiceAPI.md +++ b/client/docs/EmojisServiceAPI.md @@ -1,6 +1,6 @@ # \EmojisServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/EndorsementsServiceAPI.md b/client/docs/EndorsementsServiceAPI.md index ae9b9dc..af0d2b1 100644 --- a/client/docs/EndorsementsServiceAPI.md +++ b/client/docs/EndorsementsServiceAPI.md @@ -1,6 +1,6 @@ # \EndorsementsServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/GetContributors200Response.md b/client/docs/GetContributors200Response.md new file mode 100644 index 0000000..c548101 --- /dev/null +++ b/client/docs/GetContributors200Response.md @@ -0,0 +1,72 @@ +# GetContributors200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]DbUser**](DbUser.md) | | +**Meta** | [**PageMetaDto**](PageMetaDto.md) | | + +## Methods + +### NewGetContributors200Response + +`func NewGetContributors200Response(data []DbUser, meta PageMetaDto, ) *GetContributors200Response` + +NewGetContributors200Response instantiates a new GetContributors200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetContributors200ResponseWithDefaults + +`func NewGetContributors200ResponseWithDefaults() *GetContributors200Response` + +NewGetContributors200ResponseWithDefaults instantiates a new GetContributors200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *GetContributors200Response) GetData() []DbUser` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetContributors200Response) GetDataOk() (*[]DbUser, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetContributors200Response) SetData(v []DbUser)` + +SetData sets Data field to given value. + + +### GetMeta + +`func (o *GetContributors200Response) GetMeta() PageMetaDto` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *GetContributors200Response) GetMetaOk() (*PageMetaDto, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *GetContributors200Response) SetMeta(v PageMetaDto)` + +SetMeta sets Meta field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/docs/GetUserListContributors200Response.md b/client/docs/GetUserListContributors200Response.md new file mode 100644 index 0000000..e945dc8 --- /dev/null +++ b/client/docs/GetUserListContributors200Response.md @@ -0,0 +1,72 @@ +# GetUserListContributors200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]DbUserListContributor**](DbUserListContributor.md) | | +**Meta** | [**PageMetaDto**](PageMetaDto.md) | | + +## Methods + +### NewGetUserListContributors200Response + +`func NewGetUserListContributors200Response(data []DbUserListContributor, meta PageMetaDto, ) *GetUserListContributors200Response` + +NewGetUserListContributors200Response instantiates a new GetUserListContributors200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetUserListContributors200ResponseWithDefaults + +`func NewGetUserListContributors200ResponseWithDefaults() *GetUserListContributors200Response` + +NewGetUserListContributors200ResponseWithDefaults instantiates a new GetUserListContributors200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *GetUserListContributors200Response) GetData() []DbUserListContributor` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetUserListContributors200Response) GetDataOk() (*[]DbUserListContributor, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetUserListContributors200Response) SetData(v []DbUserListContributor)` + +SetData sets Data field to given value. + + +### GetMeta + +`func (o *GetUserListContributors200Response) GetMeta() PageMetaDto` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *GetUserListContributors200Response) GetMetaOk() (*PageMetaDto, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *GetUserListContributors200Response) SetMeta(v PageMetaDto)` + +SetMeta sets Meta field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/docs/HealthCheckServiceAPI.md b/client/docs/HealthCheckServiceAPI.md index 7335013..17816bf 100644 --- a/client/docs/HealthCheckServiceAPI.md +++ b/client/docs/HealthCheckServiceAPI.md @@ -1,6 +1,6 @@ # \HealthCheckServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/HighlightsServiceAPI.md b/client/docs/HighlightsServiceAPI.md index 7901ef5..5d6d3a3 100644 --- a/client/docs/HighlightsServiceAPI.md +++ b/client/docs/HighlightsServiceAPI.md @@ -1,6 +1,6 @@ # \HighlightsServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/InsightsServiceAPI.md b/client/docs/InsightsServiceAPI.md index df18629..d5e0fc9 100644 --- a/client/docs/InsightsServiceAPI.md +++ b/client/docs/InsightsServiceAPI.md @@ -1,6 +1,6 @@ # \InsightsServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/IssueSummaryServiceAPI.md b/client/docs/IssueSummaryServiceAPI.md index cad23ba..bfaea6b 100644 --- a/client/docs/IssueSummaryServiceAPI.md +++ b/client/docs/IssueSummaryServiceAPI.md @@ -1,6 +1,6 @@ # \IssueSummaryServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/PizzaOvenServiceAPI.md b/client/docs/PizzaOvenServiceAPI.md index 15e4527..abb301a 100644 --- a/client/docs/PizzaOvenServiceAPI.md +++ b/client/docs/PizzaOvenServiceAPI.md @@ -1,6 +1,6 @@ # \PizzaOvenServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/PullRequestsServiceAPI.md b/client/docs/PullRequestsServiceAPI.md index 9c00d08..31261a9 100644 --- a/client/docs/PullRequestsServiceAPI.md +++ b/client/docs/PullRequestsServiceAPI.md @@ -1,6 +1,6 @@ # \PullRequestsServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/RepositoryServiceAPI.md b/client/docs/RepositoryServiceAPI.md index f5a0efa..edfe60c 100644 --- a/client/docs/RepositoryServiceAPI.md +++ b/client/docs/RepositoryServiceAPI.md @@ -1,6 +1,6 @@ # \RepositoryServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/StarServiceAPI.md b/client/docs/StarServiceAPI.md index 418e726..be2605a 100644 --- a/client/docs/StarServiceAPI.md +++ b/client/docs/StarServiceAPI.md @@ -1,6 +1,6 @@ # \StarServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/StargazeServiceAPI.md b/client/docs/StargazeServiceAPI.md index 2254b09..88a2119 100644 --- a/client/docs/StargazeServiceAPI.md +++ b/client/docs/StargazeServiceAPI.md @@ -1,6 +1,6 @@ # \StargazeServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/StripeServiceAPI.md b/client/docs/StripeServiceAPI.md index c39dfdc..ea11f9d 100644 --- a/client/docs/StripeServiceAPI.md +++ b/client/docs/StripeServiceAPI.md @@ -1,6 +1,6 @@ # \StripeServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/SubmitServiceAPI.md b/client/docs/SubmitServiceAPI.md index 7f3d050..0300d72 100644 --- a/client/docs/SubmitServiceAPI.md +++ b/client/docs/SubmitServiceAPI.md @@ -1,6 +1,6 @@ # \SubmitServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/UserCollaborationsServiceAPI.md b/client/docs/UserCollaborationsServiceAPI.md index 764019e..2c9cc89 100644 --- a/client/docs/UserCollaborationsServiceAPI.md +++ b/client/docs/UserCollaborationsServiceAPI.md @@ -1,6 +1,6 @@ # \UserCollaborationsServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/UserHighlightsServiceAPI.md b/client/docs/UserHighlightsServiceAPI.md index bf6da98..58a3e0f 100644 --- a/client/docs/UserHighlightsServiceAPI.md +++ b/client/docs/UserHighlightsServiceAPI.md @@ -1,6 +1,6 @@ # \UserHighlightsServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/docs/UserListsServiceAPI.md b/client/docs/UserListsServiceAPI.md new file mode 100644 index 0000000..3ae1d06 --- /dev/null +++ b/client/docs/UserListsServiceAPI.md @@ -0,0 +1,642 @@ +# \UserListsServiceAPI + +All URIs are relative to *https://api.opensauced.pizza* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddListForUser**](UserListsServiceAPI.md#AddListForUser) | **Post** /v1/lists | Adds a new list for the authenticated user +[**DeleteListForUser**](UserListsServiceAPI.md#DeleteListForUser) | **Delete** /v1/lists/{id} | Deletes the list for the authenticated user +[**DeleteUserListContributor**](UserListsServiceAPI.md#DeleteUserListContributor) | **Delete** /v1/lists/{id}/contributors/{userListContributorId} | Delete contributor from an individual user list +[**GetContributors**](UserListsServiceAPI.md#GetContributors) | **Get** /v1/lists/contributors | Retrieves paginated contributors +[**GetListsForUser**](UserListsServiceAPI.md#GetListsForUser) | **Get** /v1/lists | Gets lists for the authenticated user +[**GetUserList**](UserListsServiceAPI.md#GetUserList) | **Get** /v1/lists/{id} | Retrieves an individual user list +[**GetUserListContributors**](UserListsServiceAPI.md#GetUserListContributors) | **Get** /v1/lists/{id}/contributors | Retrieves contributors for an individual user list +[**PostUserListContributors**](UserListsServiceAPI.md#PostUserListContributors) | **Post** /v1/lists/{id}/contributors | Add new contributors to an individual user list +[**UpdateListForUser**](UserListsServiceAPI.md#UpdateListForUser) | **Patch** /v1/lists/{id} | Updates the list for the authenticated user + + + +## AddListForUser + +> DbUserList AddListForUser(ctx).CreateUserListDto(createUserListDto).Execute() + +Adds a new list for the authenticated user + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + createUserListDto := *openapiclient.NewCreateUserListDto("My List", false, []int32{int32(123)}) // CreateUserListDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserListsServiceAPI.AddListForUser(context.Background()).CreateUserListDto(createUserListDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.AddListForUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddListForUser`: DbUserList + fmt.Fprintf(os.Stdout, "Response from `UserListsServiceAPI.AddListForUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddListForUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUserListDto** | [**CreateUserListDto**](CreateUserListDto.md) | | + +### Return type + +[**DbUserList**](DbUserList.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteListForUser + +> DeleteListForUser(ctx, id).Execute() + +Deletes the list for the authenticated user + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UserListsServiceAPI.DeleteListForUser(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.DeleteListForUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteListForUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUserListContributor + +> DeleteUserListContributor(ctx, id, userListContributorId).Execute() + +Delete contributor from an individual user list + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + id := "id_example" // string | + userListContributorId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UserListsServiceAPI.DeleteUserListContributor(context.Background(), id, userListContributorId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.DeleteUserListContributor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | +**userListContributorId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserListContributorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetContributors + +> GetContributors200Response GetContributors(ctx).Page(page).Limit(limit).Location(location).Timezone(timezone).PrVelocity(prVelocity).Execute() + +Retrieves paginated contributors + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 10) + location := "Denver, Colorado" // string | (optional) + timezone := "Mountain Standard Time" // string | (optional) + prVelocity := int32(2) // int32 | Less than or equal to the average number of days to merge a PR over the last 30 days (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserListsServiceAPI.GetContributors(context.Background()).Page(page).Limit(limit).Location(location).Timezone(timezone).PrVelocity(prVelocity).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.GetContributors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetContributors`: GetContributors200Response + fmt.Fprintf(os.Stdout, "Response from `UserListsServiceAPI.GetContributors`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetContributorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 10] + **location** | **string** | | + **timezone** | **string** | | + **prVelocity** | **int32** | Less than or equal to the average number of days to merge a PR over the last 30 days | + +### Return type + +[**GetContributors200Response**](GetContributors200Response.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetListsForUser + +> DbUserList GetListsForUser(ctx).Page(page).Limit(limit).OrderDirection(orderDirection).Range_(range_).Execute() + +Gets lists for the authenticated user + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 10) + orderDirection := openapiclient.OrderDirectionEnum("ASC") // OrderDirectionEnum | (optional) + range_ := int32(56) // int32 | Range in days (optional) (default to 30) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserListsServiceAPI.GetListsForUser(context.Background()).Page(page).Limit(limit).OrderDirection(orderDirection).Range_(range_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.GetListsForUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetListsForUser`: DbUserList + fmt.Fprintf(os.Stdout, "Response from `UserListsServiceAPI.GetListsForUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetListsForUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 10] + **orderDirection** | [**OrderDirectionEnum**](OrderDirectionEnum.md) | | + **range_** | **int32** | Range in days | [default to 30] + +### Return type + +[**DbUserList**](DbUserList.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserList + +> DbUserList GetUserList(ctx, id).Execute() + +Retrieves an individual user list + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserListsServiceAPI.GetUserList(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.GetUserList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserList`: DbUserList + fmt.Fprintf(os.Stdout, "Response from `UserListsServiceAPI.GetUserList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DbUserList**](DbUserList.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserListContributors + +> GetUserListContributors200Response GetUserListContributors(ctx, id).Page(page).Limit(limit).OrderDirection(orderDirection).Range_(range_).Execute() + +Retrieves contributors for an individual user list + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + id := "id_example" // string | + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 10) + orderDirection := openapiclient.OrderDirectionEnum("ASC") // OrderDirectionEnum | (optional) + range_ := int32(56) // int32 | Range in days (optional) (default to 30) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserListsServiceAPI.GetUserListContributors(context.Background(), id).Page(page).Limit(limit).OrderDirection(orderDirection).Range_(range_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.GetUserListContributors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserListContributors`: GetUserListContributors200Response + fmt.Fprintf(os.Stdout, "Response from `UserListsServiceAPI.GetUserListContributors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserListContributorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 10] + **orderDirection** | [**OrderDirectionEnum**](OrderDirectionEnum.md) | | + **range_** | **int32** | Range in days | [default to 30] + +### Return type + +[**GetUserListContributors200Response**](GetUserListContributors200Response.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PostUserListContributors + +> []DbUserListContributor PostUserListContributors(ctx, id).CollaboratorsDto(collaboratorsDto).Execute() + +Add new contributors to an individual user list + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + id := "id_example" // string | + collaboratorsDto := *openapiclient.NewCollaboratorsDto([]int32{int32(123)}) // CollaboratorsDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserListsServiceAPI.PostUserListContributors(context.Background(), id).CollaboratorsDto(collaboratorsDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.PostUserListContributors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostUserListContributors`: []DbUserListContributor + fmt.Fprintf(os.Stdout, "Response from `UserListsServiceAPI.PostUserListContributors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPostUserListContributorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **collaboratorsDto** | [**CollaboratorsDto**](CollaboratorsDto.md) | | + +### Return type + +[**[]DbUserListContributor**](DbUserListContributor.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateListForUser + +> DbUserList UpdateListForUser(ctx, id).CreateUserListDto(createUserListDto).Execute() + +Updates the list for the authenticated user + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + id := "id_example" // string | + createUserListDto := *openapiclient.NewCreateUserListDto("My List", false, []int32{int32(123)}) // CreateUserListDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserListsServiceAPI.UpdateListForUser(context.Background(), id).CreateUserListDto(createUserListDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserListsServiceAPI.UpdateListForUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateListForUser`: DbUserList + fmt.Fprintf(os.Stdout, "Response from `UserListsServiceAPI.UpdateListForUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateListForUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createUserListDto** | [**CreateUserListDto**](CreateUserListDto.md) | | + +### Return type + +[**DbUserList**](DbUserList.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/client/docs/UserRecommendationsServiceAPI.md b/client/docs/UserRecommendationsServiceAPI.md index 20c63dc..60f905d 100644 --- a/client/docs/UserRecommendationsServiceAPI.md +++ b/client/docs/UserRecommendationsServiceAPI.md @@ -1,16 +1,87 @@ # \UserRecommendationsServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- +[**FindUserOrgsRepoRecommendations**](UserRecommendationsServiceAPI.md#FindUserOrgsRepoRecommendations) | **Get** /v1/user/recommendations/orgs | Listing recommended repos for the authenticated user based on their orgs [**FindUserRepoRecommendations**](UserRecommendationsServiceAPI.md#FindUserRepoRecommendations) | **Get** /v1/user/recommendations/repos | Listing recommended repos for the authenticated user +## FindUserOrgsRepoRecommendations + +> FindAllTopReposByUsername200Response FindUserOrgsRepoRecommendations(ctx).Page(page).Limit(limit).OrderDirection(orderDirection).Range_(range_).Execute() + +Listing recommended repos for the authenticated user based on their orgs + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 10) + orderDirection := openapiclient.OrderDirectionEnum("ASC") // OrderDirectionEnum | (optional) + range_ := int32(56) // int32 | Range in days (optional) (default to 30) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserRecommendationsServiceAPI.FindUserOrgsRepoRecommendations(context.Background()).Page(page).Limit(limit).OrderDirection(orderDirection).Range_(range_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserRecommendationsServiceAPI.FindUserOrgsRepoRecommendations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FindUserOrgsRepoRecommendations`: FindAllTopReposByUsername200Response + fmt.Fprintf(os.Stdout, "Response from `UserRecommendationsServiceAPI.FindUserOrgsRepoRecommendations`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFindUserOrgsRepoRecommendationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 10] + **orderDirection** | [**OrderDirectionEnum**](OrderDirectionEnum.md) | | + **range_** | **int32** | Range in days | [default to 30] + +### Return type + +[**FindAllTopReposByUsername200Response**](FindAllTopReposByUsername200Response.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## FindUserRepoRecommendations -> FindUserRepoRecommendations(ctx).Execute() +> FindAllTopReposByUsername200Response FindUserRepoRecommendations(ctx).Execute() Listing recommended repos for the authenticated user @@ -30,11 +101,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.UserRecommendationsServiceAPI.FindUserRepoRecommendations(context.Background()).Execute() + resp, r, err := apiClient.UserRecommendationsServiceAPI.FindUserRepoRecommendations(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserRecommendationsServiceAPI.FindUserRepoRecommendations``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } + // response from `FindUserRepoRecommendations`: FindAllTopReposByUsername200Response + fmt.Fprintf(os.Stdout, "Response from `UserRecommendationsServiceAPI.FindUserRepoRecommendations`: %v\n", resp) } ``` @@ -49,7 +122,7 @@ Other parameters are passed through a pointer to a apiFindUserRepoRecommendation ### Return type - (empty response body) +[**FindAllTopReposByUsername200Response**](FindAllTopReposByUsername200Response.md) ### Authorization @@ -58,7 +131,7 @@ Other parameters are passed through a pointer to a apiFindUserRepoRecommendation ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/client/docs/UserServiceAPI.md b/client/docs/UserServiceAPI.md index 304ea08..3027f54 100644 --- a/client/docs/UserServiceAPI.md +++ b/client/docs/UserServiceAPI.md @@ -1,6 +1,6 @@ # \UserServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -12,6 +12,7 @@ Method | HTTP request | Description [**GetFollowStatusByUsername**](UserServiceAPI.md#GetFollowStatusByUsername) | **Get** /v1/users/{username}/follow | Checks if the authenticated user follows the provided username [**GetTop10Highlights**](UserServiceAPI.md#GetTop10Highlights) | **Get** /v1/users/top | List top users [**GetUserNotifications**](UserServiceAPI.md#GetUserNotifications) | **Get** /v1/user/notifications | Retrieves notifications for the authenticated user +[**GetUsersByFilter**](UserServiceAPI.md#GetUsersByFilter) | **Get** /v1/users/search | Search users [**UnfollowUserByUsername**](UserServiceAPI.md#UnfollowUserByUsername) | **Delete** /v1/users/{username}/follow | Unfollows a user by username @@ -586,6 +587,74 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetUsersByFilter + +> DbFilteredUser GetUsersByFilter(ctx).Username(username).Page(page).Limit(limit).Execute() + +Search users + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/open-sauced/go-api" +) + +func main() { + username := "username_example" // string | Username search query to filter from the list of users (default to "") + page := int32(56) // int32 | (optional) (default to 1) + limit := int32(56) // int32 | (optional) (default to 10) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserServiceAPI.GetUsersByFilter(context.Background()).Username(username).Page(page).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserServiceAPI.GetUsersByFilter``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUsersByFilter`: DbFilteredUser + fmt.Fprintf(os.Stdout, "Response from `UserServiceAPI.GetUsersByFilter`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUsersByFilterRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **string** | Username search query to filter from the list of users | [default to ""] + **page** | **int32** | | [default to 1] + **limit** | **int32** | | [default to 10] + +### Return type + +[**DbFilteredUser**](DbFilteredUser.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## UnfollowUserByUsername > DbUserToUserFollows UnfollowUserByUsername(ctx, username).Execute() diff --git a/client/docs/VoteServiceAPI.md b/client/docs/VoteServiceAPI.md index ea9a9a9..1b0df97 100644 --- a/client/docs/VoteServiceAPI.md +++ b/client/docs/VoteServiceAPI.md @@ -1,6 +1,6 @@ # \VoteServiceAPI -All URIs are relative to *http://localhost:3001* +All URIs are relative to *https://api.opensauced.pizza* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/model_collaborators_dto.go b/client/model_collaborators_dto.go new file mode 100644 index 0000000..5769473 --- /dev/null +++ b/client/model_collaborators_dto.go @@ -0,0 +1,117 @@ +/* +@open-sauced/api.opensauced.pizza + + ## Swagger-UI API Documentation This REST API can be used to create, read, update or delete data from the Open Sauced community platform. The Swagger-UI provides useful information to get started and an overview of all available resources. Each API route is clickable and has their own detailed description on how to use it. The base URL for the API is [api.opensauced.pizza](https://api.opensauced.pizza). [comment]: # (TODO: add bearer auth information) ## Rate limiting Every IP address is allowed to perform 5000 requests per hour. This is measured by saving the date of the initial request and counting all requests in the next hour. When an IP address goes over the limit, HTTP status code 429 is returned. The returned HTTP headers of any API request show the current rate limit status: header | description --- | --- `X-RateLimit-Limit` | The maximum number of requests allowed per hour `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window `X-RateLimit-Reset` | The date and time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time) [comment]: # (TODO: add pagination information) ## Common response codes Each route shows for each method which data they expect and which they will respond when the call succeeds. The table below shows most common response codes you can receive from our endpoints. code | condition --- | --- [`200`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) | The [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request was handled successfully. The response provides the requested data. [`201`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201) | The [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request was handled successfully. The response provides the created data. [`204`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204) | The [`PATCH`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) or [`DELETE`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request was handled successfully. The response provides no data, generally. [`400`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) | The server will not process the request due to something that is perceived to be a client error. Check the provided error for mote information. [`401`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) | The request requires user authentication. Check the provided error for more information. [`403`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) | The request was valid, but the server is refusing user access. Check the provided error for more information. [`404`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) | The requested resource could not be found. Check the provided error for more information. [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) | The current API Key made too many requests in the last hour. Check [Rate limiting](#ratelimiting) for more information. ## Additional links + +API version: 1 +Contact: hello@opensauced.pizza +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// checks if the CollaboratorsDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollaboratorsDto{} + +// CollaboratorsDto struct for CollaboratorsDto +type CollaboratorsDto struct { + // An array of contributor user IDs + Contributors []int32 `json:"contributors"` +} + +// NewCollaboratorsDto instantiates a new CollaboratorsDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollaboratorsDto(contributors []int32) *CollaboratorsDto { + this := CollaboratorsDto{} + this.Contributors = contributors + return &this +} + +// NewCollaboratorsDtoWithDefaults instantiates a new CollaboratorsDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollaboratorsDtoWithDefaults() *CollaboratorsDto { + this := CollaboratorsDto{} + return &this +} + +// GetContributors returns the Contributors field value +func (o *CollaboratorsDto) GetContributors() []int32 { + if o == nil { + var ret []int32 + return ret + } + + return o.Contributors +} + +// GetContributorsOk returns a tuple with the Contributors field value +// and a boolean to check if the value has been set. +func (o *CollaboratorsDto) GetContributorsOk() ([]int32, bool) { + if o == nil { + return nil, false + } + return o.Contributors, true +} + +// SetContributors sets field value +func (o *CollaboratorsDto) SetContributors(v []int32) { + o.Contributors = v +} + +func (o CollaboratorsDto) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollaboratorsDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["contributors"] = o.Contributors + return toSerialize, nil +} + +type NullableCollaboratorsDto struct { + value *CollaboratorsDto + isSet bool +} + +func (v NullableCollaboratorsDto) Get() *CollaboratorsDto { + return v.value +} + +func (v *NullableCollaboratorsDto) Set(val *CollaboratorsDto) { + v.value = val + v.isSet = true +} + +func (v NullableCollaboratorsDto) IsSet() bool { + return v.isSet +} + +func (v *NullableCollaboratorsDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollaboratorsDto(val *CollaboratorsDto) *NullableCollaboratorsDto { + return &NullableCollaboratorsDto{value: val, isSet: true} +} + +func (v NullableCollaboratorsDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollaboratorsDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/client/model_create_user_list_dto.go b/client/model_create_user_list_dto.go new file mode 100644 index 0000000..0372490 --- /dev/null +++ b/client/model_create_user_list_dto.go @@ -0,0 +1,173 @@ +/* +@open-sauced/api.opensauced.pizza + + ## Swagger-UI API Documentation This REST API can be used to create, read, update or delete data from the Open Sauced community platform. The Swagger-UI provides useful information to get started and an overview of all available resources. Each API route is clickable and has their own detailed description on how to use it. The base URL for the API is [api.opensauced.pizza](https://api.opensauced.pizza). [comment]: # (TODO: add bearer auth information) ## Rate limiting Every IP address is allowed to perform 5000 requests per hour. This is measured by saving the date of the initial request and counting all requests in the next hour. When an IP address goes over the limit, HTTP status code 429 is returned. The returned HTTP headers of any API request show the current rate limit status: header | description --- | --- `X-RateLimit-Limit` | The maximum number of requests allowed per hour `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window `X-RateLimit-Reset` | The date and time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time) [comment]: # (TODO: add pagination information) ## Common response codes Each route shows for each method which data they expect and which they will respond when the call succeeds. The table below shows most common response codes you can receive from our endpoints. code | condition --- | --- [`200`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) | The [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request was handled successfully. The response provides the requested data. [`201`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201) | The [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request was handled successfully. The response provides the created data. [`204`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204) | The [`PATCH`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) or [`DELETE`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request was handled successfully. The response provides no data, generally. [`400`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) | The server will not process the request due to something that is perceived to be a client error. Check the provided error for mote information. [`401`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) | The request requires user authentication. Check the provided error for more information. [`403`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) | The request was valid, but the server is refusing user access. Check the provided error for more information. [`404`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) | The requested resource could not be found. Check the provided error for more information. [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) | The current API Key made too many requests in the last hour. Check [Rate limiting](#ratelimiting) for more information. ## Additional links + +API version: 1 +Contact: hello@opensauced.pizza +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// checks if the CreateUserListDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserListDto{} + +// CreateUserListDto struct for CreateUserListDto +type CreateUserListDto struct { + // List Name + Name string `json:"name"` + // List Visibility + IsPublic bool `json:"is_public"` + // An array of contributor user IDs + Contributors []int32 `json:"contributors"` +} + +// NewCreateUserListDto instantiates a new CreateUserListDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateUserListDto(name string, isPublic bool, contributors []int32) *CreateUserListDto { + this := CreateUserListDto{} + this.Name = name + this.IsPublic = isPublic + this.Contributors = contributors + return &this +} + +// NewCreateUserListDtoWithDefaults instantiates a new CreateUserListDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateUserListDtoWithDefaults() *CreateUserListDto { + this := CreateUserListDto{} + return &this +} + +// GetName returns the Name field value +func (o *CreateUserListDto) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateUserListDto) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateUserListDto) SetName(v string) { + o.Name = v +} + +// GetIsPublic returns the IsPublic field value +func (o *CreateUserListDto) GetIsPublic() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPublic +} + +// GetIsPublicOk returns a tuple with the IsPublic field value +// and a boolean to check if the value has been set. +func (o *CreateUserListDto) GetIsPublicOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPublic, true +} + +// SetIsPublic sets field value +func (o *CreateUserListDto) SetIsPublic(v bool) { + o.IsPublic = v +} + +// GetContributors returns the Contributors field value +func (o *CreateUserListDto) GetContributors() []int32 { + if o == nil { + var ret []int32 + return ret + } + + return o.Contributors +} + +// GetContributorsOk returns a tuple with the Contributors field value +// and a boolean to check if the value has been set. +func (o *CreateUserListDto) GetContributorsOk() ([]int32, bool) { + if o == nil { + return nil, false + } + return o.Contributors, true +} + +// SetContributors sets field value +func (o *CreateUserListDto) SetContributors(v []int32) { + o.Contributors = v +} + +func (o CreateUserListDto) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserListDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["is_public"] = o.IsPublic + toSerialize["contributors"] = o.Contributors + return toSerialize, nil +} + +type NullableCreateUserListDto struct { + value *CreateUserListDto + isSet bool +} + +func (v NullableCreateUserListDto) Get() *CreateUserListDto { + return v.value +} + +func (v *NullableCreateUserListDto) Set(val *CreateUserListDto) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserListDto) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserListDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserListDto(val *CreateUserListDto) *NullableCreateUserListDto { + return &NullableCreateUserListDto{value: val, isSet: true} +} + +func (v NullableCreateUserListDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserListDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/client/model_db_filtered_user.go b/client/model_db_filtered_user.go new file mode 100644 index 0000000..3e77eca --- /dev/null +++ b/client/model_db_filtered_user.go @@ -0,0 +1,154 @@ +/* +@open-sauced/api.opensauced.pizza + + ## Swagger-UI API Documentation This REST API can be used to create, read, update or delete data from the Open Sauced community platform. The Swagger-UI provides useful information to get started and an overview of all available resources. Each API route is clickable and has their own detailed description on how to use it. The base URL for the API is [api.opensauced.pizza](https://api.opensauced.pizza). [comment]: # (TODO: add bearer auth information) ## Rate limiting Every IP address is allowed to perform 5000 requests per hour. This is measured by saving the date of the initial request and counting all requests in the next hour. When an IP address goes over the limit, HTTP status code 429 is returned. The returned HTTP headers of any API request show the current rate limit status: header | description --- | --- `X-RateLimit-Limit` | The maximum number of requests allowed per hour `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window `X-RateLimit-Reset` | The date and time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time) [comment]: # (TODO: add pagination information) ## Common response codes Each route shows for each method which data they expect and which they will respond when the call succeeds. The table below shows most common response codes you can receive from our endpoints. code | condition --- | --- [`200`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) | The [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request was handled successfully. The response provides the requested data. [`201`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201) | The [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request was handled successfully. The response provides the created data. [`204`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204) | The [`PATCH`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) or [`DELETE`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request was handled successfully. The response provides no data, generally. [`400`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) | The server will not process the request due to something that is perceived to be a client error. Check the provided error for mote information. [`401`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) | The request requires user authentication. Check the provided error for more information. [`403`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) | The request was valid, but the server is refusing user access. Check the provided error for more information. [`404`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) | The requested resource could not be found. Check the provided error for more information. [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) | The current API Key made too many requests in the last hour. Check [Rate limiting](#ratelimiting) for more information. ## Additional links + +API version: 1 +Contact: hello@opensauced.pizza +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// checks if the DbFilteredUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DbFilteredUser{} + +// DbFilteredUser struct for DbFilteredUser +type DbFilteredUser struct { + // User Login + Login *string `json:"login,omitempty"` + // Users fullname + FullName string `json:"full_name"` +} + +// NewDbFilteredUser instantiates a new DbFilteredUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDbFilteredUser(fullName string) *DbFilteredUser { + this := DbFilteredUser{} + this.FullName = fullName + return &this +} + +// NewDbFilteredUserWithDefaults instantiates a new DbFilteredUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDbFilteredUserWithDefaults() *DbFilteredUser { + this := DbFilteredUser{} + return &this +} + +// GetLogin returns the Login field value if set, zero value otherwise. +func (o *DbFilteredUser) GetLogin() string { + if o == nil || IsNil(o.Login) { + var ret string + return ret + } + return *o.Login +} + +// GetLoginOk returns a tuple with the Login field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DbFilteredUser) GetLoginOk() (*string, bool) { + if o == nil || IsNil(o.Login) { + return nil, false + } + return o.Login, true +} + +// HasLogin returns a boolean if a field has been set. +func (o *DbFilteredUser) HasLogin() bool { + if o != nil && !IsNil(o.Login) { + return true + } + + return false +} + +// SetLogin gets a reference to the given string and assigns it to the Login field. +func (o *DbFilteredUser) SetLogin(v string) { + o.Login = &v +} + +// GetFullName returns the FullName field value +func (o *DbFilteredUser) GetFullName() string { + if o == nil { + var ret string + return ret + } + + return o.FullName +} + +// GetFullNameOk returns a tuple with the FullName field value +// and a boolean to check if the value has been set. +func (o *DbFilteredUser) GetFullNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FullName, true +} + +// SetFullName sets field value +func (o *DbFilteredUser) SetFullName(v string) { + o.FullName = v +} + +func (o DbFilteredUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DbFilteredUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Login) { + toSerialize["login"] = o.Login + } + toSerialize["full_name"] = o.FullName + return toSerialize, nil +} + +type NullableDbFilteredUser struct { + value *DbFilteredUser + isSet bool +} + +func (v NullableDbFilteredUser) Get() *DbFilteredUser { + return v.value +} + +func (v *NullableDbFilteredUser) Set(val *DbFilteredUser) { + v.value = val + v.isSet = true +} + +func (v NullableDbFilteredUser) IsSet() bool { + return v.isSet +} + +func (v *NullableDbFilteredUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDbFilteredUser(val *DbFilteredUser) *NullableDbFilteredUser { + return &NullableDbFilteredUser{value: val, isSet: true} +} + +func (v NullableDbFilteredUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDbFilteredUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/client/model_db_pr_insight.go b/client/model_db_pr_insight.go index 0fde4c2..29f5ba3 100644 --- a/client/model_db_pr_insight.go +++ b/client/model_db_pr_insight.go @@ -25,7 +25,7 @@ type DbPRInsight struct { // Selected interval in numerical days, goes back with number, 0 means today Interval int32 `json:"interval"` // Selected interval computed date in human readable format - Day DateTime `json:"day"` + Day string `json:"day"` // PR Type: all requests count AllPrs int32 `json:"all_prs"` // PR Type: accepted requests count @@ -38,7 +38,7 @@ type DbPRInsight struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDbPRInsight(id int32, interval int32, day DateTime, allPrs int32, acceptedPrs int32, spamPrs int32) *DbPRInsight { +func NewDbPRInsight(id int32, interval int32, day string, allPrs int32, acceptedPrs int32, spamPrs int32) *DbPRInsight { this := DbPRInsight{} this.Id = id this.Interval = interval @@ -108,9 +108,9 @@ func (o *DbPRInsight) SetInterval(v int32) { } // GetDay returns the Day field value -func (o *DbPRInsight) GetDay() DateTime { +func (o *DbPRInsight) GetDay() string { if o == nil { - var ret DateTime + var ret string return ret } @@ -119,7 +119,7 @@ func (o *DbPRInsight) GetDay() DateTime { // GetDayOk returns a tuple with the Day field value // and a boolean to check if the value has been set. -func (o *DbPRInsight) GetDayOk() (*DateTime, bool) { +func (o *DbPRInsight) GetDayOk() (*string, bool) { if o == nil { return nil, false } @@ -127,7 +127,7 @@ func (o *DbPRInsight) GetDayOk() (*DateTime, bool) { } // SetDay sets field value -func (o *DbPRInsight) SetDay(v DateTime) { +func (o *DbPRInsight) SetDay(v string) { o.Day = v } diff --git a/client/model_db_pull_request.go b/client/model_db_pull_request.go index b4ccaf3..c1c3046 100644 --- a/client/model_db_pull_request.go +++ b/client/model_db_pull_request.go @@ -79,6 +79,8 @@ type DbPullRequest struct { ChangedFiles *int32 `json:"changed_files,omitempty"` // Pull request repo full name FullName *string `json:"full_name,omitempty"` + // Number of commits in the PR + Commits *int32 `json:"commits,omitempty"` } // NewDbPullRequest instantiates a new DbPullRequest object @@ -956,6 +958,38 @@ func (o *DbPullRequest) SetFullName(v string) { o.FullName = &v } +// GetCommits returns the Commits field value if set, zero value otherwise. +func (o *DbPullRequest) GetCommits() int32 { + if o == nil || IsNil(o.Commits) { + var ret int32 + return ret + } + return *o.Commits +} + +// GetCommitsOk returns a tuple with the Commits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DbPullRequest) GetCommitsOk() (*int32, bool) { + if o == nil || IsNil(o.Commits) { + return nil, false + } + return o.Commits, true +} + +// HasCommits returns a boolean if a field has been set. +func (o *DbPullRequest) HasCommits() bool { + if o != nil && !IsNil(o.Commits) { + return true + } + + return false +} + +// SetCommits gets a reference to the given int32 and assigns it to the Commits field. +func (o *DbPullRequest) SetCommits(v int32) { + o.Commits = &v +} + func (o DbPullRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -1033,6 +1067,9 @@ func (o DbPullRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.FullName) { toSerialize["full_name"] = o.FullName } + if !IsNil(o.Commits) { + toSerialize["commits"] = o.Commits + } return toSerialize, nil } diff --git a/client/model_db_user_list.go b/client/model_db_user_list.go new file mode 100644 index 0000000..30187e2 --- /dev/null +++ b/client/model_db_user_list.go @@ -0,0 +1,313 @@ +/* +@open-sauced/api.opensauced.pizza + + ## Swagger-UI API Documentation This REST API can be used to create, read, update or delete data from the Open Sauced community platform. The Swagger-UI provides useful information to get started and an overview of all available resources. Each API route is clickable and has their own detailed description on how to use it. The base URL for the API is [api.opensauced.pizza](https://api.opensauced.pizza). [comment]: # (TODO: add bearer auth information) ## Rate limiting Every IP address is allowed to perform 5000 requests per hour. This is measured by saving the date of the initial request and counting all requests in the next hour. When an IP address goes over the limit, HTTP status code 429 is returned. The returned HTTP headers of any API request show the current rate limit status: header | description --- | --- `X-RateLimit-Limit` | The maximum number of requests allowed per hour `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window `X-RateLimit-Reset` | The date and time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time) [comment]: # (TODO: add pagination information) ## Common response codes Each route shows for each method which data they expect and which they will respond when the call succeeds. The table below shows most common response codes you can receive from our endpoints. code | condition --- | --- [`200`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) | The [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request was handled successfully. The response provides the requested data. [`201`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201) | The [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request was handled successfully. The response provides the created data. [`204`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204) | The [`PATCH`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) or [`DELETE`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request was handled successfully. The response provides no data, generally. [`400`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) | The server will not process the request due to something that is perceived to be a client error. Check the provided error for mote information. [`401`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) | The request requires user authentication. Check the provided error for more information. [`403`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) | The request was valid, but the server is refusing user access. Check the provided error for more information. [`404`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) | The requested resource could not be found. Check the provided error for more information. [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) | The current API Key made too many requests in the last hour. Check [Rate limiting](#ratelimiting) for more information. ## Additional links + +API version: 1 +Contact: hello@opensauced.pizza +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" + "time" +) + +// checks if the DbUserList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DbUserList{} + +// DbUserList struct for DbUserList +type DbUserList struct { + // User List identifier + Id string `json:"id"` + // User ID + UserId int32 `json:"user_id"` + // List Name + Name string `json:"name"` + // Flag indicating insight visibility + IsPublic bool `json:"is_public"` + // Timestamp representing insight creation + CreatedAt *time.Time `json:"created_at,omitempty"` + // Timestamp representing insight last updated + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // Timestamp representing insight deletion + DeletedAt *time.Time `json:"deleted_at,omitempty"` +} + +// NewDbUserList instantiates a new DbUserList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDbUserList(id string, userId int32, name string, isPublic bool) *DbUserList { + this := DbUserList{} + this.Id = id + this.UserId = userId + this.Name = name + this.IsPublic = isPublic + return &this +} + +// NewDbUserListWithDefaults instantiates a new DbUserList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDbUserListWithDefaults() *DbUserList { + this := DbUserList{} + return &this +} + +// GetId returns the Id field value +func (o *DbUserList) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DbUserList) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DbUserList) SetId(v string) { + o.Id = v +} + +// GetUserId returns the UserId field value +func (o *DbUserList) GetUserId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *DbUserList) GetUserIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *DbUserList) SetUserId(v int32) { + o.UserId = v +} + +// GetName returns the Name field value +func (o *DbUserList) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DbUserList) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DbUserList) SetName(v string) { + o.Name = v +} + +// GetIsPublic returns the IsPublic field value +func (o *DbUserList) GetIsPublic() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPublic +} + +// GetIsPublicOk returns a tuple with the IsPublic field value +// and a boolean to check if the value has been set. +func (o *DbUserList) GetIsPublicOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPublic, true +} + +// SetIsPublic sets field value +func (o *DbUserList) SetIsPublic(v bool) { + o.IsPublic = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DbUserList) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DbUserList) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DbUserList) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DbUserList) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DbUserList) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DbUserList) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DbUserList) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DbUserList) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise. +func (o *DbUserList) GetDeletedAt() time.Time { + if o == nil || IsNil(o.DeletedAt) { + var ret time.Time + return ret + } + return *o.DeletedAt +} + +// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DbUserList) GetDeletedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.DeletedAt) { + return nil, false + } + return o.DeletedAt, true +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *DbUserList) HasDeletedAt() bool { + if o != nil && !IsNil(o.DeletedAt) { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given time.Time and assigns it to the DeletedAt field. +func (o *DbUserList) SetDeletedAt(v time.Time) { + o.DeletedAt = &v +} + +func (o DbUserList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DbUserList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["user_id"] = o.UserId + toSerialize["name"] = o.Name + toSerialize["is_public"] = o.IsPublic + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.DeletedAt) { + toSerialize["deleted_at"] = o.DeletedAt + } + return toSerialize, nil +} + +type NullableDbUserList struct { + value *DbUserList + isSet bool +} + +func (v NullableDbUserList) Get() *DbUserList { + return v.value +} + +func (v *NullableDbUserList) Set(val *DbUserList) { + v.value = val + v.isSet = true +} + +func (v NullableDbUserList) IsSet() bool { + return v.isSet +} + +func (v *NullableDbUserList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDbUserList(val *DbUserList) *NullableDbUserList { + return &NullableDbUserList{value: val, isSet: true} +} + +func (v NullableDbUserList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDbUserList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/client/model_db_user_list_contributor.go b/client/model_db_user_list_contributor.go new file mode 100644 index 0000000..d38849e --- /dev/null +++ b/client/model_db_user_list_contributor.go @@ -0,0 +1,248 @@ +/* +@open-sauced/api.opensauced.pizza + + ## Swagger-UI API Documentation This REST API can be used to create, read, update or delete data from the Open Sauced community platform. The Swagger-UI provides useful information to get started and an overview of all available resources. Each API route is clickable and has their own detailed description on how to use it. The base URL for the API is [api.opensauced.pizza](https://api.opensauced.pizza). [comment]: # (TODO: add bearer auth information) ## Rate limiting Every IP address is allowed to perform 5000 requests per hour. This is measured by saving the date of the initial request and counting all requests in the next hour. When an IP address goes over the limit, HTTP status code 429 is returned. The returned HTTP headers of any API request show the current rate limit status: header | description --- | --- `X-RateLimit-Limit` | The maximum number of requests allowed per hour `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window `X-RateLimit-Reset` | The date and time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time) [comment]: # (TODO: add pagination information) ## Common response codes Each route shows for each method which data they expect and which they will respond when the call succeeds. The table below shows most common response codes you can receive from our endpoints. code | condition --- | --- [`200`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) | The [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request was handled successfully. The response provides the requested data. [`201`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201) | The [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request was handled successfully. The response provides the created data. [`204`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204) | The [`PATCH`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) or [`DELETE`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request was handled successfully. The response provides no data, generally. [`400`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) | The server will not process the request due to something that is perceived to be a client error. Check the provided error for mote information. [`401`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) | The request requires user authentication. Check the provided error for more information. [`403`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) | The request was valid, but the server is refusing user access. Check the provided error for more information. [`404`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) | The requested resource could not be found. Check the provided error for more information. [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) | The current API Key made too many requests in the last hour. Check [Rate limiting](#ratelimiting) for more information. ## Additional links + +API version: 1 +Contact: hello@opensauced.pizza +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" + "time" +) + +// checks if the DbUserListContributor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DbUserListContributor{} + +// DbUserListContributor struct for DbUserListContributor +type DbUserListContributor struct { + // User list contributor identifier + Id string `json:"id"` + // User identifier + UserId int32 `json:"user_id"` + // List identifier + ListId string `json:"list_id"` + // Timestamp representing top repo first index + CreatedAt *time.Time `json:"created_at,omitempty"` + // User list collaborator's login + Login *string `json:"login,omitempty"` +} + +// NewDbUserListContributor instantiates a new DbUserListContributor object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDbUserListContributor(id string, userId int32, listId string) *DbUserListContributor { + this := DbUserListContributor{} + this.Id = id + this.UserId = userId + this.ListId = listId + return &this +} + +// NewDbUserListContributorWithDefaults instantiates a new DbUserListContributor object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDbUserListContributorWithDefaults() *DbUserListContributor { + this := DbUserListContributor{} + return &this +} + +// GetId returns the Id field value +func (o *DbUserListContributor) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DbUserListContributor) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DbUserListContributor) SetId(v string) { + o.Id = v +} + +// GetUserId returns the UserId field value +func (o *DbUserListContributor) GetUserId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *DbUserListContributor) GetUserIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *DbUserListContributor) SetUserId(v int32) { + o.UserId = v +} + +// GetListId returns the ListId field value +func (o *DbUserListContributor) GetListId() string { + if o == nil { + var ret string + return ret + } + + return o.ListId +} + +// GetListIdOk returns a tuple with the ListId field value +// and a boolean to check if the value has been set. +func (o *DbUserListContributor) GetListIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ListId, true +} + +// SetListId sets field value +func (o *DbUserListContributor) SetListId(v string) { + o.ListId = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DbUserListContributor) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DbUserListContributor) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DbUserListContributor) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DbUserListContributor) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetLogin returns the Login field value if set, zero value otherwise. +func (o *DbUserListContributor) GetLogin() string { + if o == nil || IsNil(o.Login) { + var ret string + return ret + } + return *o.Login +} + +// GetLoginOk returns a tuple with the Login field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DbUserListContributor) GetLoginOk() (*string, bool) { + if o == nil || IsNil(o.Login) { + return nil, false + } + return o.Login, true +} + +// HasLogin returns a boolean if a field has been set. +func (o *DbUserListContributor) HasLogin() bool { + if o != nil && !IsNil(o.Login) { + return true + } + + return false +} + +// SetLogin gets a reference to the given string and assigns it to the Login field. +func (o *DbUserListContributor) SetLogin(v string) { + o.Login = &v +} + +func (o DbUserListContributor) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DbUserListContributor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["user_id"] = o.UserId + toSerialize["list_id"] = o.ListId + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Login) { + toSerialize["login"] = o.Login + } + return toSerialize, nil +} + +type NullableDbUserListContributor struct { + value *DbUserListContributor + isSet bool +} + +func (v NullableDbUserListContributor) Get() *DbUserListContributor { + return v.value +} + +func (v *NullableDbUserListContributor) Set(val *DbUserListContributor) { + v.value = val + v.isSet = true +} + +func (v NullableDbUserListContributor) IsSet() bool { + return v.isSet +} + +func (v *NullableDbUserListContributor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDbUserListContributor(val *DbUserListContributor) *NullableDbUserListContributor { + return &NullableDbUserListContributor{value: val, isSet: true} +} + +func (v NullableDbUserListContributor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDbUserListContributor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/client/model_get_contributors_200_response.go b/client/model_get_contributors_200_response.go new file mode 100644 index 0000000..d90e3a6 --- /dev/null +++ b/client/model_get_contributors_200_response.go @@ -0,0 +1,143 @@ +/* +@open-sauced/api.opensauced.pizza + + ## Swagger-UI API Documentation This REST API can be used to create, read, update or delete data from the Open Sauced community platform. The Swagger-UI provides useful information to get started and an overview of all available resources. Each API route is clickable and has their own detailed description on how to use it. The base URL for the API is [api.opensauced.pizza](https://api.opensauced.pizza). [comment]: # (TODO: add bearer auth information) ## Rate limiting Every IP address is allowed to perform 5000 requests per hour. This is measured by saving the date of the initial request and counting all requests in the next hour. When an IP address goes over the limit, HTTP status code 429 is returned. The returned HTTP headers of any API request show the current rate limit status: header | description --- | --- `X-RateLimit-Limit` | The maximum number of requests allowed per hour `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window `X-RateLimit-Reset` | The date and time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time) [comment]: # (TODO: add pagination information) ## Common response codes Each route shows for each method which data they expect and which they will respond when the call succeeds. The table below shows most common response codes you can receive from our endpoints. code | condition --- | --- [`200`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) | The [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request was handled successfully. The response provides the requested data. [`201`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201) | The [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request was handled successfully. The response provides the created data. [`204`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204) | The [`PATCH`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) or [`DELETE`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request was handled successfully. The response provides no data, generally. [`400`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) | The server will not process the request due to something that is perceived to be a client error. Check the provided error for mote information. [`401`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) | The request requires user authentication. Check the provided error for more information. [`403`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) | The request was valid, but the server is refusing user access. Check the provided error for more information. [`404`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) | The requested resource could not be found. Check the provided error for more information. [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) | The current API Key made too many requests in the last hour. Check [Rate limiting](#ratelimiting) for more information. ## Additional links + +API version: 1 +Contact: hello@opensauced.pizza +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// checks if the GetContributors200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetContributors200Response{} + +// GetContributors200Response struct for GetContributors200Response +type GetContributors200Response struct { + Data []DbUser `json:"data"` + Meta PageMetaDto `json:"meta"` +} + +// NewGetContributors200Response instantiates a new GetContributors200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetContributors200Response(data []DbUser, meta PageMetaDto) *GetContributors200Response { + this := GetContributors200Response{} + this.Data = data + this.Meta = meta + return &this +} + +// NewGetContributors200ResponseWithDefaults instantiates a new GetContributors200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetContributors200ResponseWithDefaults() *GetContributors200Response { + this := GetContributors200Response{} + return &this +} + +// GetData returns the Data field value +func (o *GetContributors200Response) GetData() []DbUser { + if o == nil { + var ret []DbUser + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *GetContributors200Response) GetDataOk() ([]DbUser, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *GetContributors200Response) SetData(v []DbUser) { + o.Data = v +} + +// GetMeta returns the Meta field value +func (o *GetContributors200Response) GetMeta() PageMetaDto { + if o == nil { + var ret PageMetaDto + return ret + } + + return o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value +// and a boolean to check if the value has been set. +func (o *GetContributors200Response) GetMetaOk() (*PageMetaDto, bool) { + if o == nil { + return nil, false + } + return &o.Meta, true +} + +// SetMeta sets field value +func (o *GetContributors200Response) SetMeta(v PageMetaDto) { + o.Meta = v +} + +func (o GetContributors200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetContributors200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["meta"] = o.Meta + return toSerialize, nil +} + +type NullableGetContributors200Response struct { + value *GetContributors200Response + isSet bool +} + +func (v NullableGetContributors200Response) Get() *GetContributors200Response { + return v.value +} + +func (v *NullableGetContributors200Response) Set(val *GetContributors200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetContributors200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetContributors200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetContributors200Response(val *GetContributors200Response) *NullableGetContributors200Response { + return &NullableGetContributors200Response{value: val, isSet: true} +} + +func (v NullableGetContributors200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetContributors200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/client/model_get_user_list_contributors_200_response.go b/client/model_get_user_list_contributors_200_response.go new file mode 100644 index 0000000..679b628 --- /dev/null +++ b/client/model_get_user_list_contributors_200_response.go @@ -0,0 +1,143 @@ +/* +@open-sauced/api.opensauced.pizza + + ## Swagger-UI API Documentation This REST API can be used to create, read, update or delete data from the Open Sauced community platform. The Swagger-UI provides useful information to get started and an overview of all available resources. Each API route is clickable and has their own detailed description on how to use it. The base URL for the API is [api.opensauced.pizza](https://api.opensauced.pizza). [comment]: # (TODO: add bearer auth information) ## Rate limiting Every IP address is allowed to perform 5000 requests per hour. This is measured by saving the date of the initial request and counting all requests in the next hour. When an IP address goes over the limit, HTTP status code 429 is returned. The returned HTTP headers of any API request show the current rate limit status: header | description --- | --- `X-RateLimit-Limit` | The maximum number of requests allowed per hour `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window `X-RateLimit-Reset` | The date and time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time) [comment]: # (TODO: add pagination information) ## Common response codes Each route shows for each method which data they expect and which they will respond when the call succeeds. The table below shows most common response codes you can receive from our endpoints. code | condition --- | --- [`200`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) | The [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request was handled successfully. The response provides the requested data. [`201`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201) | The [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request was handled successfully. The response provides the created data. [`204`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204) | The [`PATCH`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) or [`DELETE`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request was handled successfully. The response provides no data, generally. [`400`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) | The server will not process the request due to something that is perceived to be a client error. Check the provided error for mote information. [`401`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) | The request requires user authentication. Check the provided error for more information. [`403`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) | The request was valid, but the server is refusing user access. Check the provided error for more information. [`404`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) | The requested resource could not be found. Check the provided error for more information. [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) | The current API Key made too many requests in the last hour. Check [Rate limiting](#ratelimiting) for more information. ## Additional links + +API version: 1 +Contact: hello@opensauced.pizza +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// checks if the GetUserListContributors200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserListContributors200Response{} + +// GetUserListContributors200Response struct for GetUserListContributors200Response +type GetUserListContributors200Response struct { + Data []DbUserListContributor `json:"data"` + Meta PageMetaDto `json:"meta"` +} + +// NewGetUserListContributors200Response instantiates a new GetUserListContributors200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetUserListContributors200Response(data []DbUserListContributor, meta PageMetaDto) *GetUserListContributors200Response { + this := GetUserListContributors200Response{} + this.Data = data + this.Meta = meta + return &this +} + +// NewGetUserListContributors200ResponseWithDefaults instantiates a new GetUserListContributors200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetUserListContributors200ResponseWithDefaults() *GetUserListContributors200Response { + this := GetUserListContributors200Response{} + return &this +} + +// GetData returns the Data field value +func (o *GetUserListContributors200Response) GetData() []DbUserListContributor { + if o == nil { + var ret []DbUserListContributor + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *GetUserListContributors200Response) GetDataOk() ([]DbUserListContributor, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *GetUserListContributors200Response) SetData(v []DbUserListContributor) { + o.Data = v +} + +// GetMeta returns the Meta field value +func (o *GetUserListContributors200Response) GetMeta() PageMetaDto { + if o == nil { + var ret PageMetaDto + return ret + } + + return o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value +// and a boolean to check if the value has been set. +func (o *GetUserListContributors200Response) GetMetaOk() (*PageMetaDto, bool) { + if o == nil { + return nil, false + } + return &o.Meta, true +} + +// SetMeta sets field value +func (o *GetUserListContributors200Response) SetMeta(v PageMetaDto) { + o.Meta = v +} + +func (o GetUserListContributors200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserListContributors200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["meta"] = o.Meta + return toSerialize, nil +} + +type NullableGetUserListContributors200Response struct { + value *GetUserListContributors200Response + isSet bool +} + +func (v NullableGetUserListContributors200Response) Get() *GetUserListContributors200Response { + return v.value +} + +func (v *NullableGetUserListContributors200Response) Set(val *GetUserListContributors200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserListContributors200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserListContributors200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserListContributors200Response(val *GetUserListContributors200Response) *NullableGetUserListContributors200Response { + return &NullableGetUserListContributors200Response{value: val, isSet: true} +} + +func (v NullableGetUserListContributors200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserListContributors200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/client/test/api_user_lists_service_test.go b/client/test/api_user_lists_service_test.go new file mode 100644 index 0000000..ba0344b --- /dev/null +++ b/client/test/api_user_lists_service_test.go @@ -0,0 +1,144 @@ +/* +@open-sauced/api.opensauced.pizza + +Testing UserListsServiceAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package client + +import ( + "context" + openapiclient "github.com/open-sauced/go-api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_client_UserListsServiceAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test UserListsServiceAPIService AddListForUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserListsServiceAPI.AddListForUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserListsServiceAPIService DeleteListForUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + httpRes, err := apiClient.UserListsServiceAPI.DeleteListForUser(context.Background(), id).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserListsServiceAPIService DeleteUserListContributor", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + var userListContributorId int32 + + httpRes, err := apiClient.UserListsServiceAPI.DeleteUserListContributor(context.Background(), id, userListContributorId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserListsServiceAPIService GetContributors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserListsServiceAPI.GetContributors(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserListsServiceAPIService GetListsForUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserListsServiceAPI.GetListsForUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserListsServiceAPIService GetUserList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.UserListsServiceAPI.GetUserList(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserListsServiceAPIService GetUserListContributors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.UserListsServiceAPI.GetUserListContributors(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserListsServiceAPIService PostUserListContributors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.UserListsServiceAPI.PostUserListContributors(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserListsServiceAPIService UpdateListForUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.UserListsServiceAPI.UpdateListForUser(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/generate.sh b/generate.sh index cb897ca..8523a8b 100755 --- a/generate.sh +++ b/generate.sh @@ -3,13 +3,15 @@ # This script will generate the OpenAPI Go client code for the OpenSauced API # - Requires Docker to run -API_VERSION="v1.47.0-beta.1" +API_VERSION="v1.48.0-beta.9" docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.0.0 generate \ - -i https://raw.githubusercontent.com/open-sauced/api/${API_VERSION}/swagger.yaml \ - -g go \ - -o /local/client \ - -p packageName=client \ - --git-user-id open-sauced \ + --additional-properties packageName=client \ + --generator-name go \ --git-repo-id go-api \ + --git-user-id open-sauced \ + --input-spec https://raw.githubusercontent.com/open-sauced/api/${API_VERSION}/swagger.yaml \ + --output /local/client \ --skip-validate-spec + +gofmt -w . \ No newline at end of file