~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

7
63 lines · 3.2 KB Raw History
{
  "lexicon": 1,
  "id": "dev.knotless.getActorActivity",
  "description": "How much an account did on each day, as an appview has indexed it.",
  "defs": {
    "main": {
      "type": "query",
      "description": "How much an account did on each day since a time, by kind, as an appview has indexed it, and its repositories' pushes: when each was last pushed to, and how often on each of those days. Days are dates in the zone `tz`, and only days with something done are listed. Repositories and accounts taken down count for nothing. No authentication; responses are not personalized.",
      "parameters": {
        "type": "params",
        "required": ["actor"],
        "properties": {
          "actor": { "type": "string", "format": "did", "description": "The account." },
          "since": { "type": "string", "format": "datetime", "description": "The first day counted is the one this falls on in `tz`; a year before now if not given." },
          "tz": { "type": "string", "maxLength": 64, "description": "The IANA time zone whose days are counted, as `America/New_York`; UTC if not given or not known." }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["days", "repos"],
          "properties": {
            "days": { "type": "array", "items": { "type": "ref", "ref": "#dayView" }, "description": "Oldest first." },
            "repos": { "type": "array", "items": { "type": "ref", "ref": "#repoActivity" }, "description": "Each of the account's repositories ever pushed to, by name." }
          }
        }
      }
    },
    "dayView": {
      "type": "object",
      "description": "What the account did on one day.",
      "required": ["day"],
      "properties": {
        "day": { "type": "string", "description": "The date in `tz`, as YYYY-MM-DD." },
        "repos": { "type": "integer", "minimum": 0, "description": "Repositories it made." },
        "pushes": { "type": "integer", "minimum": 0, "description": "Refs it moved, made or deleted, one for each claim." },
        "pulls": { "type": "integer", "minimum": 0, "description": "Pulls it opened." },
        "issues": { "type": "integer", "minimum": 0, "description": "Issues it opened." },
        "comments": { "type": "integer", "minimum": 0, "description": "Comments it wrote." }
      }
    },
    "repoActivity": {
      "type": "object",
      "description": "The pushes to one of the account's repositories.",
      "required": ["name", "pushedAt", "days"],
      "properties": {
        "name": { "type": "string", "description": "The repository's name: its record key." },
        "pushedAt": { "type": "string", "format": "datetime", "description": "When it was last pushed to, ever." },
        "days": { "type": "array", "items": { "type": "ref", "ref": "#repoDay" }, "description": "The days since `since` it was pushed to, oldest first." }
      }
    },
    "repoDay": {
      "type": "object",
      "description": "The pushes to a repository on one day.",
      "required": ["day", "pushes"],
      "properties": {
        "day": { "type": "string", "description": "The date in `tz`, as YYYY-MM-DD." },
        "pushes": { "type": "integer", "minimum": 1, "description": "Refs moved, made or deleted." }
      }
    }
  }
}