Skip to content

Instantly share code, notes, and snippets.

@evsapi
evsapi / uploadFile.java
Created April 27, 2012 14:35 — forked from kinlane/uploadFile.java
IDrive - EVS - REST API - uploadFile
try
{
String sourcePath="/test/photos/My.jpg";
String fileName="My.jpg";
String destPath="/myfiles/";
@evsapi
evsapi / uploadFile.java
Created April 27, 2012 14:35 — forked from kinlane/uploadFile.java
IDrive - EVS - REST API - uploadFile
try
{
String sourcePath="/test/photos/My.jpg";
String fileName="My.jpg";
String destPath="/myfiles/";
@evsapi
evsapi / uploadFile.java
Created April 27, 2012 14:41 — forked from kinlane/uploadFile.java
IDrive - EVS - REST API - uploadFile
try
{
String sourcePath="/test/photos/My.jpg";
String fileName="My.jpg";
String destPath="/myfiles/";
@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="uid="+strUsername+"&pwd="+strPassword+"&pvtkey="+strKey+"&p="+strPath;
// Parameters to download/restore specified version
String params="uid="+strUsername+"&pwd="+strPassword+"&pvtkey="+strKey+"&p="+strPath+"&version="+strVersion;
}
@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");
<?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);
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()
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")
@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();
<?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);