File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ const scalingo = require ( '../../dist/scalingo.js' )
2+
3+ scalingo
4+ . clientFromToken ( process . env . SCALINGO_TOKEN )
5+ . then ( ( client ) => {
6+ return client . Projects . delete ( 'project-id' )
7+ } )
8+ . then ( ( ) => {
9+ console . log ( 'Project deleted successfully' )
10+ } )
11+ . catch ( ( err ) => {
12+ console . error ( err )
13+ } )
Original file line number Diff line number Diff line change @@ -66,4 +66,14 @@ export default class Projects {
6666 "project" ,
6767 ) ;
6868 }
69+
70+ /**
71+ * Delete a project
72+ * @see https://developers.scalingo.com/projects#delete-a-project
73+ * @param id ID of the project
74+ * @return Promise that when resolved indicates the project has been deleted.
75+ */
76+ delete ( id : string ) : Promise < void > {
77+ return this . _client . apiClient ( ) . delete ( `/projects/${ id } ` ) ;
78+ }
6979}
You can’t perform that action at this time.
0 commit comments