Socket
Socket
Sign inDemoInstall

telegra.ph

Package Overview
Dependencies
7
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    telegra.ph

Tiny API helper for Telegra.ph


Version published
Maintainers
1
Install size
586 kB
Created

Readme

Source

📝 telegra.ph

NPM Version Build Status

Tiny API helper for Telegra.ph.

Telegra.ph API docs

API

Installation

$ npm install telegra.ph --save

Example

const Telegraph = require('telegra.ph')

const client = new Telegraph()

client.createAccount().then((account) => {
  client.token = account.access_token
  return client.getPageList()
}).then((pages) => console.log(pages))

const Telegraph = require('telegra.ph')

const client = new Telegraph(process.env.TOKEN)
client.getPageList().then((pages) => console.log(pages))

API documentation

createAccount

.createAccount(shortName, name, url)

createPage

.createPage(title, content, authorName, authorUrl, returnContent)

editAccountInfo

.editAccountInfo(shortName, name, url)

editPage

.editPage(path, title, content, authorName, authorUrl, returnContent)

getPage

.getPage(path, returnContent)

getViews

.getViews(path, year, month, day, hour)

getPageList

.getPageList(path, offset, limit)

revokeAccessToken

.revokeAccessToken()

Keywords

FAQs

Last updated on 06 Feb 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc