Skip to content

Instantly share code, notes, and snippets.

require "net/https"
require 'uri'
uri = URI.parse("<IDRIVESYNC 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/validateAccount")
import urllib, urllib2
url = '<SERVER LOCATION>/evs/validateAccount'
params = urllib.urlencode({
'uid': <USER ID>,
'pwd': <USER PASSWORD>
})
result = urllib.urlopen(url, params).read()
<?php
curl_setopt($ch, CURLOPT_URL, '<SERVER LOCATION>/evs/validateAccount');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
$body = 'uid=' . '<USER ID>'. '&pwd=' . '<USER PASSWORD>';
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
@evsapi
evsapi / accountValidate.java
Created May 14, 2012 21:23 — forked from kinlane/accountValidate.java
IDrive - EVS - REST API - accountValidate
String params="uid="+user+"&pwd="+password;
try
{
URL evsURL = new URL("https://<server address>/evs/accountValidate");
HttpURLConnection con = (HttpURLConnection)evsURL.openConnection();
require "net/https"
require 'uri'
uri = URI.parse("https://evs.idrivesync.com")
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/getServerAddress")
import urllib, urllib2
url = 'https://evs.idrivesync.com/evs/getServerAddress'
params = urllib.urlencode({
'uid': <USER ID>,
'pwd': <USER PASSWORD>
})
result = urllib.urlopen(url, params).read()
<?php
curl_setopt($ch, CURLOPT_URL, 'https://evs.idrivesync.com/evs/getServerAddress');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
$body = 'uid=' . '<USER ID>'. '&pwd=' . '<USER PASSWORD>';
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
@evsapi
evsapi / getServerAddress.java
Created May 14, 2012 21:16 — forked from kinlane/getServerAddress.java
IDrive - EVS - REST API - getServerAddress
String params="uid="+user+"&pwd="+pass;
URL evsURL = new URL("https://evs.idrivesync.com/evs/getServerAddress");
HttpURLConnection con = (HttpURLConnection)evsURL.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
@evsapi
evsapi / downloadFile.java
Created April 27, 2012 14:46 — forked from kinlane/downloadFile.java
IDrive - EVS - REST API - downloadFile
//Parameters to download/restore the latest version
String params=&quot;uid=&quot;+strUsername+&quot;&amp;pwd=&quot;+strPassword+&quot;&amp;pvtkey=&quot;+strKey+&quot;&amp;p=&quot;+strPath;
// Parameters to download/restore specified version
String params=&quot;uid=&quot;+strUsername+&quot;&amp;pwd=&quot;+strPassword+&quot;&amp;pvtkey=&quot;+strKey+&quot;&amp;p=&quot;+strPath+&quot;&amp;version=&quot;+strVersion;
}
@evsapi
evsapi / uploadFile.java
Created April 27, 2012 14:41 — forked from kinlane/uploadFile.java
IDrive - EVS - REST API - uploadFile
try
{
String sourcePath=&quot;/test/photos/My.jpg&quot;;
String fileName=&quot;My.jpg&quot;;
String destPath=&quot;/myfiles/&quot;;