Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/cute-gobbo/twitter-api-go
Twitter API v2 available endpoints, generated with the api provided by https://api.twitter.com/2/openapi.json
This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.
Put the package under your project folder and add the following in import:
import "./swagger"
All URIs are relative to https://api.twitter.com
Class | Method | HTTP request | Description |
---|---|---|---|
BookmarksApi | GetUsersIdBookmarks | Get /2/users/{id}/bookmarks | Bookmarks by User |
BookmarksApi | PostUsersIdBookmarks | Post /2/users/{id}/bookmarks | Add Tweet to Bookmarks |
BookmarksApi | UsersIdBookmarksDelete | Delete /2/users/{id}/bookmarks/{tweet_id} | Remove a bookmarked Tweet |
ComplianceApi | CreateBatchComplianceJob | Post /2/compliance/jobs | Create compliance job |
ComplianceApi | GetBatchComplianceJob | Get /2/compliance/jobs/{id} | Get compliance job |
ComplianceApi | ListBatchComplianceJobs | Get /2/compliance/jobs | List compliance jobs |
GeneralApi | GetOpenApiSpec | Get /2/openapi.json | Returns the open api spec document. |
ListsApi | GetUserListMemberships | Get /2/users/{id}/list_memberships | Get a User's List Memberships |
ListsApi | ListAddMember | Post /2/lists/{id}/members | Add a List member |
ListsApi | ListIdCreate | Post /2/lists | Create List |
ListsApi | ListIdDelete | Delete /2/lists/{id} | Delete List |
ListsApi | ListIdGet | Get /2/lists/{id} | List lookup by List ID |
ListsApi | ListIdUpdate | Put /2/lists/{id} | Update List |
ListsApi | ListRemoveMember | Delete /2/lists/{id}/members/{user_id} | Remove a List member |
ListsApi | ListUserFollow | Post /2/users/{id}/followed_lists | Follow a List |
ListsApi | ListUserOwnedLists | Get /2/users/{id}/owned_lists | Get a User's Owned Lists |
ListsApi | ListUserPin | Post /2/users/{id}/pinned_lists | Pin a List |
ListsApi | ListUserPinnedLists | Get /2/users/{id}/pinned_lists | Get a User's Pinned Lists |
ListsApi | ListUserUnfollow | Delete /2/users/{id}/followed_lists/{list_id} | Unfollow a List |
ListsApi | ListUserUnpin | Delete /2/users/{id}/pinned_lists/{list_id} | Unpin a List |
ListsApi | UserFollowedLists | Get /2/users/{id}/followed_lists | Get User's Followed Lists |
SpacesApi | FindSpaceById | Get /2/spaces/{id} | Space lookup by Space ID |
SpacesApi | FindSpacesByCreatorIds | Get /2/spaces/by/creator_ids | Space lookup by their creators |
SpacesApi | FindSpacesByIds | Get /2/spaces | Space lookup up Space IDs |
SpacesApi | SearchSpaces | Get /2/spaces/search | Search for Spaces |
SpacesApi | SpaceBuyers | Get /2/spaces/{id}/buyers | Retrieve the list of users who purchased a ticket to the given space |
SpacesApi | SpaceTweets | Get /2/spaces/{id}/tweets | Retrieve tweets from a Space |
TweetsApi | AddOrDeleteRules | Post /2/tweets/search/stream/rules | Add/Delete rules |
TweetsApi | CreateTweet | Post /2/tweets | Creation of a Tweet |
TweetsApi | DeleteTweetById | Delete /2/tweets/{id} | Tweet delete by Tweet ID |
TweetsApi | FindTweetById | Get /2/tweets/{id} | Tweet lookup by Tweet ID |
TweetsApi | FindTweetsById | Get /2/tweets | Tweet lookup by Tweet IDs |
TweetsApi | FindTweetsThatQuoteATweet | Get /2/tweets/{id}/quote_tweets | Retrieve tweets that quote a tweet. |
TweetsApi | GetRules | Get /2/tweets/search/stream/rules | Rules lookup |
TweetsApi | HideReplyById | Put /2/tweets/{id}/hidden | Hide replies |
TweetsApi | ListsIdTweets | Get /2/lists/{id}/tweets | List Tweets timeline by List ID |
TweetsApi | SampleStream | Get /2/tweets/sample/stream | Sample stream |
TweetsApi | SearchStream | Get /2/tweets/search/stream | Filtered stream |
TweetsApi | SpaceBuyers | Get /2/spaces/{id}/buyers | Retrieve the list of users who purchased a ticket to the given space |
TweetsApi | SpaceTweets | Get /2/spaces/{id}/tweets | Retrieve tweets from a Space |
TweetsApi | TweetCountsFullArchiveSearch | Get /2/tweets/counts/all | Full archive search counts |
TweetsApi | TweetCountsRecentSearch | Get /2/tweets/counts/recent | Recent search counts |
TweetsApi | TweetsFullarchiveSearch | Get /2/tweets/search/all | Full-archive search |
TweetsApi | TweetsRecentSearch | Get /2/tweets/search/recent | Recent search |
TweetsApi | UsersIdLike | Post /2/users/{id}/likes | Causes the user (in the path) to like the specified tweet |
TweetsApi | UsersIdLikedTweets | Get /2/users/{id}/liked_tweets | Returns Tweet objects liked by the provided User ID |
TweetsApi | UsersIdMentions | Get /2/users/{id}/mentions | User mention timeline by User ID |
TweetsApi | UsersIdRetweets | Post /2/users/{id}/retweets | Causes the user (in the path) to retweet the specified tweet |
TweetsApi | UsersIdTimeline | Get /2/users/{id}/timelines/reverse_chronological | User home timeline by User ID |
TweetsApi | UsersIdTweets | Get /2/users/{id}/tweets | User Tweets timeline by User ID |
TweetsApi | UsersIdUnlike | Delete /2/users/{id}/likes/{tweet_id} | Causes the user (in the path) to unlike the specified tweet |
TweetsApi | UsersIdUnretweets | Delete /2/users/{id}/retweets/{source_tweet_id} | Causes the user (in the path) to unretweet the specified tweet |
UsersApi | FindMyUser | Get /2/users/me | User lookup me |
UsersApi | FindUserById | Get /2/users/{id} | User lookup by ID |
UsersApi | FindUserByUsername | Get /2/users/by/username/{username} | User lookup by username |
UsersApi | FindUsersById | Get /2/users | User lookup by IDs |
UsersApi | FindUsersByUsername | Get /2/users/by | User lookup by usernames |
UsersApi | ListGetFollowers | Get /2/lists/{id}/followers | Returns user objects that follow a List by the provided List ID |
UsersApi | ListGetMembers | Get /2/lists/{id}/members | Returns user objects that are members of a List by the provided List ID |
UsersApi | TweetsIdLikingUsers | Get /2/tweets/{id}/liking_users | Returns user objects that have liked the provided Tweet ID |
UsersApi | TweetsIdRetweetingUsers | Get /2/tweets/{id}/retweeted_by | Returns user objects that have retweeted the provided Tweet ID |
UsersApi | UsersIdBlock | Post /2/users/{id}/blocking | Block User by User ID |
UsersApi | UsersIdBlocking | Get /2/users/{id}/blocking | Returns user objects that are blocked by provided user ID |
UsersApi | UsersIdFollow | Post /2/users/{id}/following | Follow User |
UsersApi | UsersIdFollowers | Get /2/users/{id}/followers | Returns user objects that follow the provided user ID |
UsersApi | UsersIdFollowing | Get /2/users/{id}/following | Following by User ID |
UsersApi | UsersIdMute | Post /2/users/{id}/muting | Mute User by User ID |
UsersApi | UsersIdMuting | Get /2/users/{id}/muting | Returns user objects that are muted by the provided user ID |
UsersApi | UsersIdUnblock | Delete /2/users/{source_user_id}/blocking/{target_user_id} | Unblock User by User ID |
UsersApi | UsersIdUnfollow | Delete /2/users/{source_user_id}/following/{target_user_id} | Unfollow User |
UsersApi | UsersIdUnmute | Delete /2/users/{source_user_id}/muting/{target_user_id} | Unmute User by User ID |
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Example
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
FAQs
Unknown package
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.