Skip to content

Commit

Permalink
Add new Website.AbortWebsiteDeletion() method
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Jul 12, 2024
1 parent b916ac0 commit 40ee462
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Crisp API Golang wrapper. Authenticate, send messages, fetch conversations,

Copyright 2023 Crisp IM SAS. See LICENSE for copying information.

* **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 11/07/2024
* **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 12/07/2024
* **😘 Maintainer**: [@valeriansaliou](https://github.com/valeriansaliou)

## Usage
Expand Down Expand Up @@ -91,6 +91,8 @@ Refer directly to [the library source code](https://github.com/crisp-im/go-crisp
* `client.Website.GetWebsite(websiteID string) (*Website, *Response, error)`
* **Delete A Website** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#delete-a-website)
* `client.Website.DeleteWebsite(websiteID string, verify string) (*Response, error)`
* **Abort Website Deletion** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#abort-website-deletion)
* `client.Website.AbortWebsiteDeletion(websiteID string) (*Response, error)`

* #### **Website Batch**
* **Batch Resolve Conversations** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-resolve-items)
Expand Down
9 changes: 9 additions & 0 deletions crisp/website_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,12 @@ func (service *WebsiteService) DeleteWebsite(websiteID string, verify string) (*

return service.client.Do(req, nil)
}


// AbortWebsiteDeletion aborts scheduled deletion for an existing website.
func (service *WebsiteService) DeleteWebsite(websiteID string) (*Response, error) {
url := fmt.Sprintf("website/%s/expunge", websiteID)
req, _ := service.client.NewRequest("DELETE", url, nil)

return service.client.Do(req, nil)
}

0 comments on commit 40ee462

Please sign in to comment.