Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twitter-openapi-typescript

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-openapi-typescript - npm Package Compare versions

Comparing version 0.0.39 to 0.0.40

2

package.json
{
"name": "twitter-openapi-typescript",
"version": "0.0.39",
"version": "0.0.40",
"description": "Implementation of Twitter internal API in TypeScript",

@@ -5,0 +5,0 @@ "scripts": {

@@ -44,5 +44,6 @@ # twitter-openapi-typescript

```typescript
TwitterOpenApi.additionalApiHeaders = {
const api = new TwitterOpenApi();
api.setAdditionalApiHeaders({
'sec-ch-ua-platform': '"Windows"',
};
});
```

@@ -59,8 +60,11 @@

Most values exist as static variables. There is no need to change them.
Changing them could result in account suspension.
For advanced customization, use the
You can also use the `TwitterOpenApiClient` class directly
```typescript
import { TwitterOpenApi } from 'twitter-openapi-typescript';
TwitterOpenApi.additionalBrowserHeaders = {};
TwitterOpenApi.additionalApiHeaders = {};
TwitterOpenApi.fetchApi = fetch.bind(globalThis);
TwitterOpenApi.twitter = 'https://x.com/home';
TwitterOpenApi.bearer = 'xxxx';
```

@@ -67,0 +71,0 @@

@@ -30,6 +30,6 @@ import { TwitterOpenApi } from '@/api';

export const getClient = async () => {
TwitterOpenApi.additionalApiHeaders = {
const api = new TwitterOpenApi();
api.setAdditionalApiHeaders({
'sec-ch-ua-platform': '"Windows"',
};
const api = new TwitterOpenApi();
});
const data = await fs.readFile('cookies.json', 'utf-8');

@@ -36,0 +36,0 @@ const parsed = JSON.parse(data);

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc