Skip to content

Commit

Permalink
Implement project destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
İsmail Akbudak committed Mar 12, 2018
1 parent c5a3f88 commit 609f44f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
PROJECT_ID = 'EXAMPLE_PROJECT_ID'.freeze
puts project.get(PROJECT_ID)

# Delete project
puts project.delete(PROJECT_ID)

# Create project without file
model = {
'name' => 'Test',
Expand Down
4 changes: 4 additions & 0 deletions lib/smartcat_sdk/rest/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def create(project_model, files: [])
def get(project_id)
prepare_request(:get, "#{@resource}/#{project_id}")
end

def delete(project_id)
prepare_request(:delete, "#{@resource}/#{project_id}")
end
end
end
end

0 comments on commit 609f44f

Please sign in to comment.