substack-feed-api 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +90 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1 +1,90 @@
1
- # substack-feed-api
1
+ # Substack Feed API
2
+
3
+ The Substack Feed API is a powerful and flexible API designed to fetch and parse Substack newsletter feeds, making it easier for developers to integrate Substack content into their applications. Built with TypeScript, this API leverages modern JavaScript practices to provide a robust solution for accessing Substack newsletter data.
4
+
5
+ ## Features
6
+
7
+ - **Fetch Newsletter Feeds**: Easily retrieve the latest posts from any Substack newsletter.
8
+ - **Parse Feed Data**: Convert Substack newsletter feeds into a structured format for easy integration.
9
+ - **TypeScript Support**: Enjoy the benefits of TypeScript, with type definitions for all the API responses.
10
+ - **Customizable**: Flexible API that can be tailored to fit the needs of your application.
11
+
12
+ ## Getting Started
13
+
14
+ ### Prerequisites
15
+
16
+ - Node.js (version 20.x or higher)
17
+ - npm (latest version)
18
+
19
+ ### Installation
20
+
21
+ To use the Substack Feed API in your project, follow these steps:
22
+
23
+ 1. Install the package via npm:
24
+
25
+ ```bash
26
+ npm install substack-feed-api
27
+ ```
28
+
29
+ 2. Import the API into your project:
30
+
31
+ ```typescript
32
+ import { SubstackFeedApi } from 'substack-feed-api';
33
+ ```
34
+
35
+ ### Usage
36
+
37
+ Here's a quick example to get you started:
38
+
39
+ ```typescript
40
+ const api = new SubstackFeedApi();
41
+
42
+ api.fetchNewsletter('your-substack-newsletter-name').then(feed => {
43
+ console.info(feed);
44
+ }).catch(error => {
45
+ console.error('Error fetching newsletter:', error);
46
+ });
47
+ ```
48
+
49
+ Replace `'your-substack-newsletter-name'` with the name of the Substack newsletter you wish to fetch.
50
+
51
+ ## Development
52
+
53
+ To contribute to the Substack Feed API or run it locally for development, you will need to follow these steps:
54
+
55
+ 1. Clone the repository:
56
+
57
+ ```bash
58
+ git clone https://github.com/rohit1901/substack-feed-api.git
59
+ ```
60
+
61
+ 2. Install dependencies:
62
+
63
+ ```bash
64
+ npm install
65
+ ```
66
+
67
+ 3. Run the development server:
68
+
69
+ ```bash
70
+ npm run dev
71
+ ```
72
+
73
+ ## Building
74
+
75
+ To build the project for production, run:
76
+
77
+ ```bash
78
+ npm run build
79
+ ```
80
+
81
+ This will generate the production-ready files in the `dist` directory.
82
+
83
+ ## Contributing
84
+
85
+ Contributions are welcome! Feel free to open an issue or submit a pull request if you have any improvements or bug fixes to suggest.
86
+
87
+ ## License
88
+
89
+ This project is licensed under the MIT License.
90
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substack-feed-api",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",