Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
fix #45
Browse files Browse the repository at this point in the history
  • Loading branch information
skoudoro committed Jan 31, 2022
1 parent 71c0884 commit ee60472
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Then, you do not need to precise it in your code:
"name": "Regular campaign name",
"groups": [2984475, 3237221],
"type": "regular"}
>>> api.campaign.create(data)
>>> api.campaign.delete(campaign_id=3971635)
>>> api.campaigns.create(data)
>>> api.campaigns.delete(campaign_id=3971635)
```

#### Send a campaign
Expand All @@ -109,7 +109,7 @@ Then, you do not need to precise it in your code:
"groups": [2984475, 3237221],
"type": "regular"}
>>>
>>> _, res = api.campaign.create(data)
>>> _, res = api.campaigns.create(data)
>>> campaign_id = res['id']
>>>
>>> html = '<head></head><body><h1>Your Title</h1><p>Your Content</p><p><small>'
Expand All @@ -118,8 +118,8 @@ Then, you do not need to precise it in your code:
>>> plain += "Open newsletter here: {$url}. If you do not want"
>>> plain += " to receive emails from us, click here: {$unsubscribe}"
>>>
>>> api.campaign.update(campaign_id, html=html, plain=plain)
>>> api.campaign.send(campaign_id)
>>> api.campaigns.update(campaign_id, html=html, plain=plain)
>>> api.campaigns.send(campaign_id)
```

#### Cancel a scheduled campaign
Expand All @@ -128,15 +128,15 @@ Then, you do not need to precise it in your code:
>>> outbox_campaigns = campaign_obj.all(status='outbox', limit=5)
>>> selected_campaign = outbox_campaigns[0]
>>>
>>> api.campaign.cancel(selected_campaign.id)
>>> api.campaigns.cancel(selected_campaign.id)
```


#### count campaign

```python
>>> api.campaign.count()
>>> api.campaign.count(status='draft')
>>> api.campaigns.count()
>>> api.campaigns.count(status='draft')
```

### Subscribers
Expand Down

0 comments on commit ee60472

Please sign in to comment.