Skip to content

Commit 62a76f8

Browse files
authored
Add Tags (#78)
* Add tags. * Update example & lint.
1 parent 5065af2 commit 62a76f8

7 files changed

Lines changed: 182 additions & 168 deletions

File tree

README.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,35 @@
88

99
Industry-leading Holiday and Event API for JavaScript/TypeScript. Over 5,000 holidays and thousands of descriptions. Trusted by the World’s leading companies. Built by developers for developers since 2011.
1010

11-
# Authentication
11+
## Authentication
12+
1213
Access to the Holiday and Event API requires an API Key. You can get for one for FREE [here](https://apilayer.com/marketplace/checkiday-api#pricing), no credit card required! Note that free plans are limited. To access more data and have more requests, a paid plan is required.
1314

14-
# Installation
15+
## Installation
1516

1617
```console
17-
$ npm install --save holiday-event-api
18+
npm install --save holiday-event-api
1819
```
1920

20-
# Example Usage
21+
## Example Usage
22+
23+
### Authentication
2124

22-
## Authentication
2325
Simply construct an instance of `Holidays` and pass your API Key like this:
26+
2427
```ts
2528
import { Holidays } from 'holiday-event-api';
2629

2730
// Get a FREE API key from https://apilayer.com/marketplace/checkiday-api#pricing
2831
const api = new Holidays({ apiKey: '<Your API Key Here>' });
2932
```
3033

31-
## Example Project
34+
### Example Project
35+
3236
You can find a fully-functioning example project [here](example).
3337

34-
## Get Events
38+
### Get Events
39+
3540
Get all events for a specified date.
3641

3742
```ts
@@ -49,6 +54,7 @@ const response = await api.getEvents({
4954
```
5055

5156
Example response (some events removed to save space):
57+
5258
```json
5359
{
5460
"timezone": "America/New_York",
@@ -92,7 +98,8 @@ Example response (some events removed to save space):
9298
}
9399
```
94100

95-
## Search For Events
101+
### Search For Events
102+
96103
Search for events with a specified query.
97104

98105
```ts
@@ -106,6 +113,7 @@ const response = await api.search({
106113
```
107114

108115
Example response:
116+
109117
```json
110118
{
111119
"query": "zucchini",
@@ -134,7 +142,8 @@ Example response:
134142
}
135143
```
136144

137-
## Get Event Information
145+
### Get Event Information
146+
138147
Get additional information for an Event.
139148

140149
```ts
@@ -151,6 +160,7 @@ const response = await api.getEventInfo({
151160
```
152161

153162
Example response (some strings shortened to save space):
163+
154164
```json
155165
{
156166
"event": {
@@ -199,6 +209,11 @@ Example response (some strings shortened to save space):
199209
"length": 1
200210
}
201211
],
212+
"tags": [
213+
{
214+
"name": "Pets & Animals"
215+
}
216+
],
202217
"occurrences": [
203218
{
204219
"date": "08/08/2002",

0 commit comments

Comments
 (0)