-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure sdk
- Loading branch information
Showing
227 changed files
with
8,876 additions
and
8,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,13 @@ | ||
# @neynar/nodejs-sdk | ||
@neynar/nodejs-sdk typescript-based, easy-to-use SDK built to interact with [Neynar API's](https://docs.neynar.com/). | ||
|
||
## Instantiate Client | ||
|
||
Just set the NEYNAR_API_KEY while instantiating a client and you are good to go. | ||
|
||
``` | ||
import { NeynarAPIClient } from "@neynar/nodejs-sdk"; | ||
@neynar/nodejs-sdk typescript-based, easy-to-use SDK built to interact with [Neynar API's](https://docs.neynar.com/). | ||
|
||
const neynarClient = new NeynarAPIClient(process.env.NEYNAR_API_KEY); | ||
## Usage | ||
|
||
export default neynarClient; | ||
``` | ||
Please refer our [Getting Started Guide](https://docs.neynar.com/reference/getting-started-with-sdk) | ||
|
||
## Use Client | ||
Checkout [examples](https://github.com/neynarxyz/farcaster-examples) using this SDK | ||
|
||
Errors are propagated, so the user can handle them as they please, so use try/catch or .catch() and handle errors accordingly | ||
## License | ||
|
||
``` | ||
try { | ||
const recentCasts = await neynarClient.fetchRecentCasts(); | ||
console.log("Recent Casts", recentCasts); | ||
} catch (error) { | ||
console.log((error as AxiosError).response?.data || (error as Error)); | ||
} | ||
``` | ||
This project is licensed under the MIT License - see the [LICENSE](https://github.com/neynarxyz/nodejs-sdk/blob/main/LICENSE) file for details. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.