The GitHub Contents API requires content to be Base64-encoded.

  • Parameters

    • ...param: [
          | {
              access_token?: string;
              action?: "create"
              | "update"
              | "delete"
              | "undelete";
              audio?: string | string[];
              author?:
                  | string
                  | {
                      "additional-name"?: string;
                      adr?: | string
                      | {
                          altitude?: number;
                          "country-name"?: string;
                          "extended-address"?: string;
                          geo?: | string
                          | { altitude?: number; latitude?: number; longitude?: number };
                          label?: string;
                          latitude?: number;
                          locality?: string;
                          longitude?: number;
                          "post-office-box"?: string;
                          "postal-code"?: string;
                          region?: string;
                          "street-address"?: string;
                      };
                      altitude?: number;
                      anniversary?: string;
                      bday?: string;
                      category?: string
                      | string[];
                      content?: string;
                      "country-name"?: string;
                      email?: string;
                      "extended-address"?: string;
                      "family-name"?: string;
                      "gender-identity"?: string;
                      geo?: { altitude?: number; latitude?: number; longitude?: number };
                      "given-name"?: string;
                      "honorific-prefix"?: string;
                      "honorific-suffix"?: string;
                      impp?: string;
                      "job-title"?: string;
                      key?: string;
                      label?: string;
                      latitude?: number;
                      locality?: string;
                      logo?: string;
                      longitude?: number;
                      name?: string;
                      nickname?: string;
                      note?: string;
                      org?: string;
                      photo?: string;
                      "post-office-box"?: string;
                      "postal-code"?: string;
                      region?: string;
                      role?: string;
                      sex?: string;
                      "sort-string"?: string;
                      "street-address"?: string;
                      tel?: string;
                      type: "card";
                      uid?: string;
                      url?: string;
                  };
              "bookmark-of"?: string;
              category?: string
              | string[]
              | (string | string[])[];
              checkin?: string;
              content?: string | { html: string; text?: string };
              date?: string;
              end?: string;
              "in-reply-to"?: string;
              "like-of"?: string;
              location?:
                  | string
                  | {
                      altitude?: number;
                      "country-name"?: string;
                      "extended-address"?: string;
                      geo?: | string
                      | { altitude?: number; latitude?: number; longitude?: number };
                      label?: string;
                      latitude?: number;
                      locality?: string;
                      longitude?: number;
                      "post-office-box"?: string;
                      "postal-code"?: string;
                      region?: string;
                      "street-address"?: string;
                  };
              "mp-channel"?: string;
              "mp-destination"?: string;
              "mp-limit"?: number;
              "mp-photo-alt"?: string
              | string[];
              "mp-post-status"?: string;
              "mp-slug"?: string;
              "mp-syndicate-to"?: string | string[];
              name?: string;
              photo?: any;
              "post-status"?: string;
              published?: string;
              "read-of"?:
                  | string
                  | {
                      accessed?: string;
                      author?: string;
                      content?: string;
                      name?: string;
                      publication?: string;
                      published?: string;
                      type: "cite";
                      uid?: string;
                      url?: string;
                  };
              "read-status"?: "to-read"
              | "reading"
              | "finished";
              "repost-of"?: string;
              rsvp?: "yes" | "no" | "maybe" | "interested";
              start?: string;
              summary?: string;
              syndication?: string | string[];
              type?:
                  | "audio"
                  | "checkin"
                  | "photo"
                  | "rsvp"
                  | "video"
                  | "card"
                  | "cite"
                  | "entry"
                  | "event"
                  | "acquisition"
                  | "article"
                  | "bookmark"
                  | "bucketlist"
                  | "chicken"
                  | "collection"
                  | "comics"
                  | "donation"
                  | "edit"
                  | "exercise"
                  | "food"
                  | "issue"
                  | "jam"
                  | "like"
                  | "note"
                  | "performance"
                  | "presentation"
                  | "quotation"
                  | "read"
                  | "recipe"
                  | "reply"
                  | "repost"
                  | "scrobble"
                  | "session"
                  | "sleep"
                  | "snark"
                  | "study"
                  | "task"
                  | "venue"
                  | "want"
                  | "wish";
              updated?: string;
              url?: string
              | string[];
              video?: string | string[];
              visibility?: "public" | "private" | "unlisted";
          }
          | {
              access_token?: string;
              action?: "create"
              | "update"
              | "delete"
              | "undelete";
              audio?: string | string[];
              author?:
                  | string
                  | {
                      "additional-name"?: string;
                      adr?: | string
                      | {
                          altitude?: number;
                          "country-name"?: string;
                          "extended-address"?: string;
                          geo?: | string
                          | { altitude?: number; latitude?: number; longitude?: number };
                          label?: string;
                          latitude?: number;
                          locality?: string;
                          longitude?: number;
                          "post-office-box"?: string;
                          "postal-code"?: string;
                          region?: string;
                          "street-address"?: string;
                      };
                      altitude?: number;
                      anniversary?: string;
                      bday?: string;
                      category?: string
                      | string[];
                      content?: string;
                      "country-name"?: string;
                      email?: string;
                      "extended-address"?: string;
                      "family-name"?: string;
                      "gender-identity"?: string;
                      geo?: { altitude?: number; latitude?: number; longitude?: number };
                      "given-name"?: string;
                      "honorific-prefix"?: string;
                      "honorific-suffix"?: string;
                      impp?: string;
                      "job-title"?: string;
                      key?: string;
                      label?: string;
                      latitude?: number;
                      locality?: string;
                      logo?: string;
                      longitude?: number;
                      name?: string;
                      nickname?: string;
                      note?: string;
                      org?: string;
                      photo?: string;
                      "post-office-box"?: string;
                      "postal-code"?: string;
                      region?: string;
                      role?: string;
                      sex?: string;
                      "sort-string"?: string;
                      "street-address"?: string;
                      tel?: string;
                      type: "card";
                      uid?: string;
                      url?: string;
                  };
              "bookmark-of"?: string;
              category?: string
              | string[]
              | (string | string[])[];
              checkin?: string;
              content?: string | { html: string; text?: string };
              date?: string;
              end?: string;
              h?:
                  | "audio"
                  | "checkin"
                  | "photo"
                  | "rsvp"
                  | "video"
                  | "card"
                  | "cite"
                  | "entry"
                  | "event"
                  | "acquisition"
                  | "article"
                  | "bookmark"
                  | "bucketlist"
                  | "chicken"
                  | "collection"
                  | "comics"
                  | "donation"
                  | "edit"
                  | "exercise"
                  | "food"
                  | "issue"
                  | "jam"
                  | "like"
                  | "note"
                  | "performance"
                  | "presentation"
                  | "quotation"
                  | "read"
                  | "recipe"
                  | "reply"
                  | "repost"
                  | "scrobble"
                  | "session"
                  | "sleep"
                  | "snark"
                  | "study"
                  | "task"
                  | "venue"
                  | "want"
                  | "wish";
              "in-reply-to"?: string;
              "like-of"?: string;
              location?: | string
              | {
                  altitude?: number;
                  "country-name"?: string;
                  "extended-address"?: string;
                  geo?: | string
                  | { altitude?: number; latitude?: number; longitude?: number };
                  label?: string;
                  latitude?: number;
                  locality?: string;
                  longitude?: number;
                  "post-office-box"?: string;
                  "postal-code"?: string;
                  region?: string;
                  "street-address"?: string;
              };
              "mp-channel"?: string;
              "mp-destination"?: string;
              "mp-limit"?: number;
              "mp-photo-alt"?: string
              | string[];
              "mp-post-status"?: string;
              "mp-slug"?: string;
              "mp-syndicate-to"?: string | string[];
              name?: string;
              photo?: any;
              "post-status"?: string;
              published?: string;
              "read-of"?:
                  | string
                  | {
                      accessed?: string;
                      author?: string;
                      content?: string;
                      name?: string;
                      publication?: string;
                      published?: string;
                      type: "cite";
                      uid?: string;
                      url?: string;
                  };
              "read-status"?: "to-read"
              | "reading"
              | "finished";
              "repost-of"?: string;
              rsvp?: "yes" | "no" | "maybe" | "interested";
              start?: string;
              summary?: string;
              syndication?: string | string[];
              updated?: string;
              url?: string | string[];
              video?: string | string[];
              visibility?: "public" | "private" | "unlisted";
          },
      ]

    Returns string