mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
initial
This commit is contained in:
parent
243f3d5039
commit
fa8d7d1bc8
2 changed files with 71 additions and 0 deletions
|
|
@ -176,6 +176,15 @@ query FindTag($id: ID, $name: String) {
|
|||
}
|
||||
}
|
||||
|
||||
query QueryTags($input: TagQueryInput!) {
|
||||
queryTags(input: $input) {
|
||||
count
|
||||
tags {
|
||||
...TagFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation SubmitFingerprint($input: FingerprintSubmission!) {
|
||||
submitFingerprint(input: $input)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ type StashBoxGraphQLClient interface {
|
|||
FindSceneByID(ctx context.Context, id string, interceptors ...clientv2.RequestInterceptor) (*FindSceneByID, error)
|
||||
FindStudio(ctx context.Context, id *string, name *string, interceptors ...clientv2.RequestInterceptor) (*FindStudio, error)
|
||||
FindTag(ctx context.Context, id *string, name *string, interceptors ...clientv2.RequestInterceptor) (*FindTag, error)
|
||||
QueryTags(ctx context.Context, input TagQueryInput, interceptors ...clientv2.RequestInterceptor) (*QueryTags, error)
|
||||
SubmitFingerprint(ctx context.Context, input FingerprintSubmission, interceptors ...clientv2.RequestInterceptor) (*SubmitFingerprint, error)
|
||||
Me(ctx context.Context, interceptors ...clientv2.RequestInterceptor) (*Me, error)
|
||||
SubmitSceneDraft(ctx context.Context, input SceneDraftInput, interceptors ...clientv2.RequestInterceptor) (*SubmitSceneDraft, error)
|
||||
|
|
@ -643,6 +644,24 @@ func (t *FindStudio_FindStudio_StudioFragment_Parent) GetName() string {
|
|||
return t.Name
|
||||
}
|
||||
|
||||
type QueryTags_QueryTags struct {
|
||||
Count int "json:\"count\" graphql:\"count\""
|
||||
Tags []*TagFragment "json:\"tags\" graphql:\"tags\""
|
||||
}
|
||||
|
||||
func (t *QueryTags_QueryTags) GetCount() int {
|
||||
if t == nil {
|
||||
t = &QueryTags_QueryTags{}
|
||||
}
|
||||
return t.Count
|
||||
}
|
||||
func (t *QueryTags_QueryTags) GetTags() []*TagFragment {
|
||||
if t == nil {
|
||||
t = &QueryTags_QueryTags{}
|
||||
}
|
||||
return t.Tags
|
||||
}
|
||||
|
||||
type Me_Me struct {
|
||||
Name string "json:\"name\" graphql:\"name\""
|
||||
}
|
||||
|
|
@ -775,6 +794,17 @@ func (t *FindTag) GetFindTag() *TagFragment {
|
|||
return t.FindTag
|
||||
}
|
||||
|
||||
type QueryTags struct {
|
||||
QueryTags QueryTags_QueryTags "json:\"queryTags\" graphql:\"queryTags\""
|
||||
}
|
||||
|
||||
func (t *QueryTags) GetQueryTags() *QueryTags_QueryTags {
|
||||
if t == nil {
|
||||
t = &QueryTags{}
|
||||
}
|
||||
return &t.QueryTags
|
||||
}
|
||||
|
||||
type SubmitFingerprint struct {
|
||||
SubmitFingerprint bool "json:\"submitFingerprint\" graphql:\"submitFingerprint\""
|
||||
}
|
||||
|
|
@ -1736,6 +1766,37 @@ func (c *Client) FindTag(ctx context.Context, id *string, name *string, intercep
|
|||
return &res, nil
|
||||
}
|
||||
|
||||
const QueryTagsDocument = `query QueryTags ($input: TagQueryInput!) {
|
||||
queryTags(input: $input) {
|
||||
count
|
||||
tags {
|
||||
... TagFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
fragment TagFragment on Tag {
|
||||
name
|
||||
id
|
||||
}
|
||||
`
|
||||
|
||||
func (c *Client) QueryTags(ctx context.Context, input TagQueryInput, interceptors ...clientv2.RequestInterceptor) (*QueryTags, error) {
|
||||
vars := map[string]any{
|
||||
"input": input,
|
||||
}
|
||||
|
||||
var res QueryTags
|
||||
if err := c.Client.Post(ctx, "QueryTags", QueryTagsDocument, &res, vars, interceptors...); err != nil {
|
||||
if c.Client.ParseDataWhenErrors {
|
||||
return &res, err
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &res, nil
|
||||
}
|
||||
|
||||
const SubmitFingerprintDocument = `mutation SubmitFingerprint ($input: FingerprintSubmission!) {
|
||||
submitFingerprint(input: $input)
|
||||
}
|
||||
|
|
@ -1838,6 +1899,7 @@ var DocumentOperationNames = map[string]string{
|
|||
FindSceneByIDDocument: "FindSceneByID",
|
||||
FindStudioDocument: "FindStudio",
|
||||
FindTagDocument: "FindTag",
|
||||
QueryTagsDocument: "QueryTags",
|
||||
SubmitFingerprintDocument: "SubmitFingerprint",
|
||||
MeDocument: "Me",
|
||||
SubmitSceneDraftDocument: "SubmitSceneDraft",
|
||||
|
|
|
|||
Loading…
Reference in a new issue