lib/travis/client/methods.rb in travis-1.12.0 vs lib/travis/client/methods.rb in travis-1.13.0
- old
+ new
@@ -95,9 +95,25 @@
def logout
session.get_raw('/logout')
end
+ def regenerate_token
+ session.headers['Travis-Api-Version'] = '3'
+ token = session.patch_raw('/access_token')
+ session.headers.delete('Travis-Api-Version')
+
+ token
+ end
+
+ def remove_token
+ session.headers['Travis-Api-Version'] = '3'
+ resp = session.delete_raw('/access_token')
+ session.headers.delete('Travis-Api-Version')
+
+ resp
+ end
+
def listen(*entities, &block)
listener = Listener.new(session)
listener.subscribe(*entities, &block)
listener.listen
end