Skip to content

Commit

Permalink
Merge pull request #697 from novuhq/rename_api_key
Browse files Browse the repository at this point in the history
Replace NOVU_API_KEY with NOVU_SECRET_KEY
  • Loading branch information
SokratisVidros committed Sep 13, 2024
2 parents 3e0a5c0 + 1b1277c commit ca188ac
Show file tree
Hide file tree
Showing 99 changed files with 344 additions and 344 deletions.
4 changes: 2 additions & 2 deletions additional-resources/idempotency.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ After this period, the reused key will be treated as a new request and response.
```javascript
import { Novu } from '@novu/node';

const novu = new Novu("<NOVU_API_KEY>");
const novu = new Novu("<NOVU_SECRET_KEY>");

await novu.trigger("<WORKFLOW_TRIGGER_IDENTIFIER>", {
to: {
Expand All @@ -92,7 +92,7 @@ After this period, the reused key will be treated as a new request and response.
```javascript
import { Novu } from '@novu/node';
const novu = new Novu("<NOVU_API_KEY>", {
const novu = new Novu("<NOVU_SECRET_KEY>", {
retryConfig: {
retryMax: 5
}
Expand Down
10 changes: 5 additions & 5 deletions api-reference/changes/apply-change.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx";
```javascript Node.js
import { Novu } from '@novu/node';

const novu = new Novu('<NOVU_API_KEY>');
const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.changes.applyOne("changeId");

````

```php PHP
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu = new Novu(<NOVU_SECRET_KEY>);
$novu->applyChange($changeId, []);
````
```ruby Ruby
require 'novu'

client = Novu::Client.new('<NOVU_API_KEY>')
client = Novu::Client.new('<NOVU_SECRET_KEY>')

client.apply_change(`<change_id≥`)
```
Expand All @@ -34,7 +34,7 @@ client.apply_change(`<change_id≥`)
from novu.api import ChangeApi

url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
api_key = "<NOVU_SECRET_KEY>"
novu = ChangeApi(url, api_key).apply(
change_id = "<A change ID to apply>",
)
Expand All @@ -45,7 +45,7 @@ import co.novu.sdk.Novu;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
String apiKey = "<NOVU_SECRET_KEY>";

Novu novu = new Novu(apiKey);
novu.applyChange('changeId');
Expand Down
10 changes: 5 additions & 5 deletions api-reference/changes/apply-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx";
```javascript Node.js
import { Novu } from '@novu/node';

const novu = new Novu('<NOVU_API_KEY>');
const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.changes.applyMany(["changeId1", "changeId2"]);

````

```php PHP
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu = new Novu(<NOVU_SECRET_KEY>);
$novu->applyBulkChanges([
'changeIds' = [
'<insert-all-the-change-ids>'
Expand All @@ -29,7 +29,7 @@ $novu->applyBulkChanges([
```ruby Ruby
require 'novu'

client = Novu::Client.new('<NOVU_API_KEY>')
client = Novu::Client.new('<NOVU_SECRET_KEY>')

client.apply_change({
'changeIds' => ['<insert-all-the-change-ids>']
Expand All @@ -40,7 +40,7 @@ client.apply_change({
from novu.api import ChangeApi

url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
api_key = "<NOVU_SECRET_KEY>"
novu = ChangeApi(url, api_key).bulk_apply(
change_ids = "<The list of IDs to apply>",
)
Expand All @@ -51,7 +51,7 @@ import co.novu.sdk.Novu;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
String apiKey = "<NOVU_SECRET_KEY>";

Novu novu = new Novu(apiKey);
novu.applyBulkChanges("<list-of-change-ids>");
Expand Down
10 changes: 5 additions & 5 deletions api-reference/changes/get-changes-count.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx";
```javascript Node.js
import { Novu } from '@novu/node';

const novu = new Novu('<NOVU_API_KEY>');
const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.changes.getCount();

````

```php PHP
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu = new Novu(<NOVU_SECRET_KEY>);
$novu->getChangesCount()->toArray();
````
```ruby Ruby
require 'novu'

client = Novu::Client.new('<NOVU_API_KEY>')
client = Novu::Client.new('<NOVU_SECRET_KEY>')

client.count_changes()
```
Expand All @@ -34,7 +34,7 @@ client.count_changes()
from novu.api import ChangeApi

url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
api_key = "<NOVU_SECRET_KEY>"
novu = ChangeApi(url, api_key).count(
)
```
Expand All @@ -44,7 +44,7 @@ import co.novu.sdk.Novu;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
String apiKey = "<NOVU_SECRET_KEY>";

Novu novu = new Novu(apiKey);
novu.countChanges();
Expand Down
10 changes: 5 additions & 5 deletions api-reference/changes/get-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx";
```javascript Node.js
import { Novu } from '@novu/node';

const novu = new Novu('<NOVU_API_KEY>');
const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.changes.get();

````

```php PHP
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu = new Novu(<NOVU_SECRET_KEY>);
$novu->getChanges();
````
```ruby Ruby
require 'novu'

client = Novu::Client.new('<NOVU_API_KEY>')
client = Novu::Client.new('<NOVU_SECRET_KEY>')

client.changes({
'page' => 1, # optional
Expand All @@ -38,7 +38,7 @@ client.changes({
from novu.api import ChangeApi

url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
api_key = "<NOVU_SECRET_KEY>"
novu = ChangeApi(url, api_key).list(
page = "<Page to retrieve>",
limit = "<Size of page>",
Expand All @@ -50,7 +50,7 @@ import co.novu.sdk.Novu;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
String apiKey = "<NOVU_SECRET_KEY>";

Novu novu = new Novu(apiKey);
novu.changes(query = {});
Expand Down
12 changes: 6 additions & 6 deletions api-reference/environments/get-api-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx";
```javascript Node.js
import { Novu } from '@novu/node';

const novu = new Novu('<NOVU_API_KEY>');
const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.environmets.getApiKeys();

````

```php PHP
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu = new Novu(<NOVU_SECRET_KEY>);
$novu->getEnvironmentsAPIKeys()->toArray();
````
```ruby Ruby
require 'novu'

client = Novu::Client.new('<NOVU_API_KEY>')
client = Novu::Client.new('<NOVU_SECRET_KEY>')
client.api_keys()
```

Expand All @@ -34,7 +34,7 @@ import co.novu.sdk.Novu;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
String apiKey = "<NOVU_SECRET_KEY>";

Novu novu = new Novu(apiKey);
novu.apiKeys();
Expand All @@ -46,7 +46,7 @@ public class Main {
from novu.api import EnvironmentApi

url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
api_key = "<NOVU_SECRET_KEY>"
apiKeys = EnvironmentApi(url, api_key).api_keys()
```

Expand All @@ -64,7 +64,7 @@ fun main() {
```bash cURL
curl --request GET \
--url https://api.novu.co/v1/environments/api-keys \
--header 'Authorization: ApiKey <NOVU_API_KEY>'
--header 'Authorization: ApiKey <NOVU_SECRET_KEY>'
```

</RequestExample>
Expand Down
12 changes: 6 additions & 6 deletions api-reference/environments/get-current-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx";
```javascript Node.js
import { Novu } from '@novu/node';

const novu = new Novu('<NOVU_API_KEY>');
const novu = new Novu('<NOVU_SECRET_KEY>');

await novu.environments.getCurrent();

Expand All @@ -19,15 +19,15 @@ await novu.environments.getCurrent();
```php PHP
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu = new Novu(<NOVU_SECRET_KEY>);
$novu->getCurrentEnvironment()->toArray();
````
```ruby Ruby
require 'novu'

client = Novu::Client.new('<NOVU_API_KEY>')
client = Novu::Client.new('<NOVU_SECRET_KEY>')

client.current_environment()
```
Expand All @@ -36,7 +36,7 @@ client.current_environment()
from novu.api import EnvironmentApi

url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
api_key = "<NOVU_SECRET_KEY>"
novu = EnvironmentApi(url, api_key).current(
)
```
Expand All @@ -46,7 +46,7 @@ import co.novu.sdk.Novu;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
String apiKey = "<NOVU_SECRET_KEY>";

Novu novu = new Novu(apiKey);
novu.currentEnvironment();
Expand All @@ -68,7 +68,7 @@ fun main() {
```bash cURL
curl --request GET \
--url https://api.novu.co/v1/environments/me \
--header 'Authorization: ApiKey <NOVU_API_KEY>'
--header 'Authorization: ApiKey <NOVU_SECRET_KEY>'
```

</RequestExample>
Expand Down
12 changes: 6 additions & 6 deletions api-reference/environments/get-environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ApikeyWarning from "/snippets/apikey-warning.mdx";
```javascript Node.js
import { Novu } from '@novu/node';

const novu = new Novu('<NOVU_API_KEY>');
const novu = new Novu('<NOVU_SECRET_KEY>');

await novu.environments.getAll();

Expand All @@ -19,22 +19,22 @@ await novu.environments.getAll();
```php PHP
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu = new Novu(<NOVU_SECRET_KEY>);
$novu->getEnvironments()->toArray();
````
```ruby Ruby
require 'novu'

client = Novu::Client.new('<NOVU_API_KEY>')
client = Novu::Client.new('<NOVU_SECRET_KEY>')
client.environments()
```

```python Python
from novu.api import EnvironmentApi

url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
api_key = "<NOVU_SECRET_KEY>"
novu = EnvironmentApi(url, api_key).list(
)
```
Expand All @@ -44,7 +44,7 @@ import co.novu.sdk.Novu;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
String apiKey = "<NOVU_SECRET_KEY>";

Novu novu = new Novu(apiKey);
novu.environments();
Expand All @@ -66,7 +66,7 @@ fun main() {
```bash cURL
curl --request GET \
--url https://api.novu.co/v1/environments \
--header 'Authorization: ApiKey <NOVU_API_KEY>'
--header 'Authorization: ApiKey <NOVU_SECRET_KEY>'
```

</RequestExample>
Expand Down
Loading

0 comments on commit ca188ac

Please sign in to comment.