All URIs are relative to https://api.mangaupdates.com/v1
Method | HTTP request | Description |
---|---|---|
AddPoll | Post /poll | add a new poll |
ArchivePoll | Delete /poll | archive the active poll |
RetrieveOldPolls | Get /poll/old | get old polls |
RetrievePoll | Get /poll | get the active poll |
RetrieveVoteStatus | Get /poll/vote/status | get information about whether the user has voted |
VotePollAnswer | Post /poll/vote/{answer_id} | vote in a poll answer |
VotePollNoAnswer | Post /poll/vote | vote in a poll |
ApiResponseV1 AddPoll(ctx).PollModelUpdateV1(pollModelUpdateV1).Execute()
add a new poll
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/belphemur/mangal/mangaupdates"
)
func main() {
pollModelUpdateV1 := *openapiclient.NewPollModelUpdateV1() // PollModelUpdateV1 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PollAPI.AddPoll(context.Background()).PollModelUpdateV1(pollModelUpdateV1).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PollAPI.AddPoll``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddPoll`: ApiResponseV1
fmt.Fprintf(os.Stdout, "Response from `PollAPI.AddPoll`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiAddPollRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
pollModelUpdateV1 | PollModelUpdateV1 |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiResponseV1 ArchivePoll(ctx).Execute()
archive the active poll
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/belphemur/mangal/mangaupdates"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PollAPI.ArchivePoll(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PollAPI.ArchivePoll``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ArchivePoll`: ApiResponseV1
fmt.Fprintf(os.Stdout, "Response from `PollAPI.ArchivePoll`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiArchivePollRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiResponseV1 RetrieveOldPolls(ctx).Execute()
get old polls
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/belphemur/mangal/mangaupdates"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PollAPI.RetrieveOldPolls(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PollAPI.RetrieveOldPolls``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetrieveOldPolls`: ApiResponseV1
fmt.Fprintf(os.Stdout, "Response from `PollAPI.RetrieveOldPolls`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiRetrieveOldPollsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PollModelV1 RetrievePoll(ctx).Execute()
get the active poll
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/belphemur/mangal/mangaupdates"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PollAPI.RetrievePoll(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PollAPI.RetrievePoll``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetrievePoll`: PollModelV1
fmt.Fprintf(os.Stdout, "Response from `PollAPI.RetrievePoll`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiRetrievePollRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PollVoteStatusModelV1 RetrieveVoteStatus(ctx).Execute()
get information about whether the user has voted
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/belphemur/mangal/mangaupdates"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PollAPI.RetrieveVoteStatus(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PollAPI.RetrieveVoteStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetrieveVoteStatus`: PollVoteStatusModelV1
fmt.Fprintf(os.Stdout, "Response from `PollAPI.RetrieveVoteStatus`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiRetrieveVoteStatusRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiResponseV1 VotePollAnswer(ctx, answerId).Execute()
vote in a poll answer
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/belphemur/mangal/mangaupdates"
)
func main() {
answerId := int64(56) // int64 | id of answer to vote for
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PollAPI.VotePollAnswer(context.Background(), answerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PollAPI.VotePollAnswer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VotePollAnswer`: ApiResponseV1
fmt.Fprintf(os.Stdout, "Response from `PollAPI.VotePollAnswer`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
answerId | int64 | id of answer to vote for |
Other parameters are passed through a pointer to a apiVotePollAnswerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiResponseV1 VotePollNoAnswer(ctx).Execute()
vote in a poll
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/belphemur/mangal/mangaupdates"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PollAPI.VotePollNoAnswer(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PollAPI.VotePollNoAnswer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VotePollNoAnswer`: ApiResponseV1
fmt.Fprintf(os.Stdout, "Response from `PollAPI.VotePollNoAnswer`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiVotePollNoAnswerRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]