Skip to content

Commit

Permalink
Prepare 0.5.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
yayuyokitano authored Dec 18, 2020
1 parent bd0e478 commit 9984fb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ The library exports a single class. This class, in turn, creates instances of a
```ts
import LastFMTyped from "lastfm-typed";

const lastfm = new LastFMTyped(api_key, api_secret, UserAgent); //insert key, secret, and user agent here
const lastfm = new LastFMTyped(api_key, api_secret, UserAgent, secureConnection); //insert key, secret, user agent, and whether to use https here
```

`api_key` is the only required parameter.

Without `api_secret`, auth commands will not work. This includes usage of session key in place of username for typically non-auth functions.

For user agent, please initialize this with an easily identifiable name (preferably one that would lead to your program if googled). You can choose to not set one, in which case `lastfm-typed-npm` will be set as the user agent. This is probably the best idea if your program is not public.

`secureConnection` determines whether to use https or http. By default, this is `false`, which uses http. Set to `true` to use https. Note that this will most likely be defaulted to true in a future major update.

Then we can call methods as needed.

### Examples
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lastfm-typed",
"version": "0.4.0",
"version": "0.5.0",
"description": "Typed API wrapper for Last.FM using promises",
"main": "dist/index.js",
"author": "yayuyokitano",
Expand Down

0 comments on commit 9984fb8

Please sign in to comment.