telegraph-api-spec

command module
v0.0.0-...-a566a6b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

README

telegraph-api-spec

Introduction

This golang program generates a JSON description of methods, types and docstrings of the Telegraph API.

Features

  • Easy to generate, just build this Go program as usual and run.
  • JSON output stored as telegraph.json can be used to make autogenerated libraries for Telegraph API
  • Typo-Free: Since the JSON output is scraped from the official documentations, it won't be having in typo.

Example Output

{
  "methods": [
    {
      "name": "getPage",
      "description": "Use this method to get a Telegraph page. Returns a Page object on success.",
      "sample_request": "https://api.telegra.ph/getPage/Sample-Page-12-15?return_content=true",
      "parameters": [
        {
          "name": "path",
          "data_type": {
            "name": "String",
            "is_array": false
          },
          "required": true,
          "description": "Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/)."
        },
      ]
    },
  ],
  "types": [
    {
      "name": "PageViews",
      "description": "This object represents the number of page views for a Telegraph article.",
      "attributes": [
        {
          "name": "views",
          "data_type": {
            "name": "Integer",
            "is_array": false
          },
          "optional": false,
          "description": "Number of page views for the target page."
        }
      ]
    }
  ]
 } 

Disclaimer

Licensed Under GNU General Public License v3

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL