
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
This repository contains the open source SDK for integrating Medium's OAuth2 API into your NodeJs app.
npm install medium-sdk
Create a client, then call commands on it.
var medium = require('medium-sdk')
var client = new medium.MediumClient({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET'
})
var url = client.getAuthorizationUrl('secretState', 'https://yoursite.com/callback/medium', [
medium.Scope.BASIC_PROFILE, medium.Scope.PUBLISH_POST
])
// (Send the user to the authorization URL to obtain an authorization code.)
client.exchangeAuthorizationCode('YOUR_AUTHORIZATION_CODE', function (err, token) {
client.getUser(function (err, user) {
client.createPost({
userId: user.id,
title: 'A new post',
contentFormat: medium.PostContentFormat.HTML,
content: '<h1>A New Post</h1><p>This is my new post.</p>',
publishStatus: medium.PostPublishStatus.DRAFT
}, function (err, post) {
console.log(token, user, post)
})
})
})
Questions, comments, bug reports, and pull requests are all welcomed. If you haven't contributed to a Medium project before please head over to the Open Source Project and fill out an OCLA (it should be pretty painless).
Copyright 2015 A Medium Corporation
Licensed under Apache License Version 2.0. Details in the attached LICENSE file.
FAQs
NodeJS client for the Medium app
The npm package medium-sdk receives a total of 47 weekly downloads. As such, medium-sdk popularity was classified as not popular.
We found that medium-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.