// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package org_tangled
// schema: org.tangled.actor.getProfileActivity
import (
"context"
"github.com/bluesky-social/indigo/lex/util"
)
const (
ActorGetProfileActivityNSID = "org.tangled.actor.getProfileActivity"
)
// ActorGetProfileActivity_ActivityMonth is a "activityMonth" in the org.tangled.actor.getProfileActivity schema.
type ActorGetProfileActivity_ActivityMonth struct {
Commits int64 `json:"commits" cborgen:"commits"`
Issues []*ActorGetProfileActivity_IssueActivity `json:"issues" cborgen:"issues"`
Pulls []*ActorGetProfileActivity_PullActivity `json:"pulls" cborgen:"pulls"`
Repos []*ActorGetProfileActivity_RepoActivity `json:"repos" cborgen:"repos"`
// start: Start of this UTC calendar month.
Start string `json:"start" cborgen:"start"`
}
// ActorGetProfileActivity_IssueActivity is a "issueActivity" in the org.tangled.actor.getProfileActivity schema.
type ActorGetProfileActivity_IssueActivity struct {
Repo *ActorGetProfileActivity_RepoRef `json:"repo" cborgen:"repo"`
State string `json:"state" cborgen:"state"`
Title string `json:"title" cborgen:"title"`
Uri string `json:"uri" cborgen:"uri"`
}
// ActorGetProfileActivity_Output is the output of a org.tangled.actor.getProfileActivity call.
type ActorGetProfileActivity_Output struct {
Months []*ActorGetProfileActivity_ActivityMonth `json:"months" cborgen:"months"`
// truncated: True when the result reached the server activity-item safety limit.
Truncated bool `json:"truncated" cborgen:"truncated"`
}
// ActorGetProfileActivity_PullActivity is a "pullActivity" in the org.tangled.actor.getProfileActivity schema.
type ActorGetProfileActivity_PullActivity struct {
Repo *ActorGetProfileActivity_RepoRef `json:"repo" cborgen:"repo"`
State string `json:"state" cborgen:"state"`
Title string `json:"title" cborgen:"title"`
Uri string `json:"uri" cborgen:"uri"`
}
// ActorGetProfileActivity_RepoActivity is a "repoActivity" in the org.tangled.actor.getProfileActivity schema.
type ActorGetProfileActivity_RepoActivity struct {
Kind string `json:"kind" cborgen:"kind"`
Repo *ActorGetProfileActivity_RepoRef `json:"repo" cborgen:"repo"`
}
// ActorGetProfileActivity_RepoRef is a "repoRef" in the org.tangled.actor.getProfileActivity schema.
type ActorGetProfileActivity_RepoRef struct {
Did *string `json:"did,omitempty" cborgen:"did,omitempty"`
Name string `json:"name" cborgen:"name"`
OwnerDid string `json:"ownerDid" cborgen:"ownerDid"`
OwnerHandle string `json:"ownerHandle" cborgen:"ownerHandle"`
Uri string `json:"uri" cborgen:"uri"`
}
// ActorGetProfileActivity calls the XRPC method "org.tangled.actor.getProfileActivity".
//
// actor: Actor whose activity to return.
// months: Number of UTC calendar months to include, including the current month.
func ActorGetProfileActivity(ctx context.Context, c util.LexClient, actor string, months int64) (*ActorGetProfileActivity_Output, error) {
var out ActorGetProfileActivity_Output
params := map[string]interface{}{}
params["actor"] = actor
if months != 0 {
params["months"] = months
}
if err := c.LexDo(ctx, util.Query, "", "org.tangled.actor.getProfileActivity", params, nil, &out); err != nil {
return nil, err
}
return &out, nil
}