Forked from delraydavis/IDrive-searchFiles-REST-API--RUBY.rb
Created
May 14, 2012 21:52
-
-
Save evsapi/2697575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "net/https" | |
| require 'uri' | |
| uri = URI.parse("<SERVER LOCATION>") | |
| http = Net::HTTP.new(uri.host, uri.port) | |
| http.use_ssl = true | |
| http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
| request = Net::HTTP::Post.new("/evs/searchFiles") | |
| request['content-type'] = "application/x-www-form-urlencoded" | |
| parameters['uid'] = <USER ID> | |
| parameters['pwd'] = <USER PASSWORD> | |
| parameters['p'] = <PATH ON THE SERVER> | |
| parameters['searchkey'] = <SEARCH STRING> | |
| parameters['trash'] = <YES TO SEARCH DELETED FILES> | |
| request.set_form_data(parameters) | |
| response = http.request(request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment