Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Oct 2, 2018
1 parent eee83cc commit 36c7be5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 29 deletions.
18 changes: 5 additions & 13 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,16 @@ You can see below the API reference of this module.
- **Object** `config`:
- `key` (String): The Sendgrid API key.

### `send(data, cb)`
### `send(data)`
Send an email.

#### Params

- **Object** `data`: An object containing the following fields:
- `subject` (String): The email subject.
- `from_email` (String): The `from` email.
- `from_name` (String): The `from` name (optional).
- `to_email` (String): The `to` email.
- `bcc_email` (String): The `bcc` email.
- `cc_email` (String): The `cc` email.
- `to_name` (String): The `to` name (optional).
- `template_id` (String): The SendGrid template id.
- `substitutions` (Object): The template substitutions.

- **Object** `data`: An object containing the message object sent to Sendgrid, as [documented here](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/mail/USE_CASES.md).
In the Bloggify config you will have to provide the following data:

- `key` (String): The SendGrid key.
- **Function** `cb`: The callback function.

#### Return
- **Promise** A promise resolving the result from Sendgrid.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-17 Bloggify <[email protected]> (https://bloggify.org)
Copyright (c) 2016-18 Bloggify <[email protected]> (https://bloggify.org)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
## :cloud: Installation

```sh
$ npm i --save bloggify-sendgrid
# Using npm
npm install --save bloggify-sendgrid

# Using yarn
yarn add bloggify-sendgrid
```


Expand Down Expand Up @@ -53,26 +57,18 @@ There are few ways to get help:
- **Object** `config`:
- `key` (String): The Sendgrid API key.

### `send(data, cb)`
### `send(data)`
Send an email.

#### Params

- **Object** `data`: An object containing the following fields:
- `subject` (String): The email subject.
- `from_email` (String): The `from` email.
- `from_name` (String): The `from` name (optional).
- `to_email` (String): The `to` email.
- `bcc_email` (String): The `bcc` email.
- `cc_email` (String): The `cc` email.
- `to_name` (String): The `to` name (optional).
- `template_id` (String): The SendGrid template id.
- `substitutions` (Object): The template substitutions.

- **Object** `data`: An object containing the message object sent to Sendgrid, as [documented here](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/mail/USE_CASES.md).
In the Bloggify config you will have to provide the following data:

- `key` (String): The SendGrid key.
- **Function** `cb`: The callback function.

#### Return
- **Promise** A promise resolving the result from Sendgrid.



Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
"dependencies": {
"@sendgrid/mail": "^6.3.1"
}
}
}

0 comments on commit 36c7be5

Please sign in to comment.