private Profile getFacebookProfile() { Log.d("Prf", "Facebook Profile"); Profile profile = new Facebook(this, "xxxx", "yyyy"); return profile; }
private Profile getGoogleProfile() { Log.d("Prf", "Google Profile"); Profile profile = new GooglePlus(this, "xxxx","yyy"); return profile; }
private Profile getTwitterProfile() { Log.d("Prf", "Twitter Profile"); Profile profile = new Twitter(this, "xxxx", "yyyyy"); return profile; }
profile = new Facebook(mContext, "[Facebook Client Identifier]", "[Facebook Client Secret]"); break; profile = new Twitter(mContext, "[Client Identifier]", "[Client Secret]"); break; profile = new GooglePlus(mContext, "[Client Identifier]", "[Client Secret]"); break; profile = new LinkedIn(mContext, "[Client Identifier]", "[Client Secret]"); break; profile = new GitHub(mContext, "[Client Identifier]", "[Client Secret]"); break; profile = new Heroku(mContext, "[Client Identifier]", "[Client Secret]"); break; profile = new Instagram(mContext, "[Client Identifier]", "[Client Secret]"); break; profile = new ProductHunt(mContext, "[Client Identifier]", "[Client Secret]"); break; profile = new Slack(mContext, "[Client Identifier]", "[Client Secret]"); break; profile = new MicrosoftLive(mContext, "[Client Identifier]", "[Client Secret]"); break;
public static void main(String[] args) { CloudRail.setAppKey("[Your CloudRail Key]"); AmazonS3 amazons3 = new AmazonS3( null, "[Your S3 Access Key ID]", "[Your AWS region]" ); Backblaze backblaze = new Backblaze( null, "[Your Backblaze Account ID]", "[Your Backblaze App Key]" ); GoogleCloudPlatform googlecloudplatform = new GoogleCloudPlatform( null, "[Your Google Client Email]", "[Your Google Project ID]" ); MicrosoftAzure microsoftazure = new MicrosoftAzure( null, "[Your Azure Account Name]", "[Your Azure Access Key]" ); Rackspace rackspace = new Rackspace( null, "[Your Rackspace User Name]",
@Override public void onClick(View v) { Social service; switch (v.getId()) { case R.id.Facebook: { service = new Facebook(mContext, "[Client ID]", "[Client Secret]"); break; } case R.id.FacebookPages: { service = new FacebookPage(mContext, "[PageName]", "[Client ID]", "[Client Secret]"); break; } case R.id.Twitter: { service = new Twitter(mContext, "[Client ID]", "[Client Secret]"); break; } default: throw new RuntimeException("Unknown Button ID!!"); } login(service); } };
private Profile getLinkedinProfile() { Log.d("Prf", "Linkedin Profile"); Profile profile = new LinkedIn(this, "xxxx", "yyyy"); return profile; }
private Profile getGithubProfile() { Log.d("Prf", "Github Profile"); Profile profile = new GitHub(this, "xxxx", "yyyy"); return profile; }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); CloudRail.setAppKey("[Your CloudRail API key]"); mailJet = new MailJet(this, "[Public MailJet API Key]", "[Secret MailJet API Key]"); sendGrid = new SendGrid(this, "[SendGrid API Key]"); Button sendButton = (Button) findViewById(R.id.sendButton); sendButton.setOnClickListener(this); }
public static void main(String[] args) throws IOException { CloudRail.setAppKey("[Your CloudRail Key]"); switch(args[0]) { case "facebook": service = new FacebookMessenger(null, "[Bot Token]"); break; case "line": service = new Line(null, "[Bot Token]"); break; case "telegram": service = new Telegram(null, "[Bot Token]", "[Webhook URL]"); break; case "viber": service = new Viber(null, "[Bot Token]", "[Webhook URL]", "[Bot Name]"); break; } HttpServer server = HttpServer.create(new InetSocketAddress(8080), 0); server.createContext("/", new MyHandler()); server.start(); }
private void initDropbox() { Dropbox db = new Dropbox(context, "[Client ID]", "[Client Secret]", "https://auth.cloudrail.com/com.cloudrail.fileviewer", "someState"); db.useAdvancedAuthentication(); dropbox.set(db); }
private void initGoogleDrive() { googledrive.set(new GoogleDrive(context, "[Client ID]", "", "com.cloudrail.fileviewer:/oauth2redirect", "")); ((GoogleDrive) googledrive.get()).useAdvancedAuthentication(); }
private void initOneDriveBusiness() { onedrivebusiness.set(new OneDriveBusiness(context, "[Client ID]", "[Client Secret]")); }
private void initBox() { box.set(new Box(context, "[Client ID]", "[Client Secret]")); }
private void initEgnyte() { egnyte.set(new Egnyte(context, "[Domain]", "[Client ID]", "[Client Secret]")); }
private void initOneDrive() { onedrive.set(new OneDrive(context, "[Client ID]", "[Client Secret]")); }
public static void main(String[] args) { CloudRail.setAppKey("[Your CloudRail Key]"); List<SMS> services = new LinkedList<SMS>(); Nexmo nexmo = new Nexmo(null, "[Nexmo API Key]", "[Nexmo API Secret]"); services.add(nexmo); Twilio twilio = new Twilio(null, "[Twilio Account SID]", "[Twilio Auth Token]"); services.add(twilio); for (SMS service : services) { try { service.sendSMS("[Sending Number]", "[Receiving Number]", "Hello from " + service.toString()); } catch (Exception e) { e.printStackTrace(); } } }
public static void main(String[] args) { CloudRail.setAppKey("[Your CloudRail Key]"); PayPal paypal = new PayPal( null, true, "[PayPal Client Identifier]", "[PayPal Client Secret]" ); Stripe stripe = new Stripe( null, "[Stripe Secret Key]" ); service = null; switch(args[0]) { case "paypal": service = paypal; break; case "stripe": service = stripe; break; } showHelp(); in = new BufferedReader(new InputStreamReader(System.in)); getNextUserCommand(); }
service = new Facebook( new LocalReceiver(port), "[Facebook Client Identifier]", break; case "github": service = new GitHub( new LocalReceiver(port), "[GitHub Client Identifier]", break; case "googleplus": service = new GooglePlus( new LocalReceiver(port), "[Google Plus Client Identifier]", break; case "heroku": service = new Heroku( new LocalReceiver(port), "[Heroku Client Identifier]", break; case "instagram": service = new Instagram( new LocalReceiver(port), "[Instagram Client Identifier]", break;
service = new AmazonS3(context, MainActivity.AMAZON_ACCESS_KEY, MainActivity.AMAZON_SECRET_ACCESS_KEY, MainActivity.AMAZON_REGION); break; service = new Backblaze(context, MainActivity.BACKBLAZE_ACCOUNT_ID, MainActivity.BACKBLACE_APP_KEY); break; service = new GoogleCloudPlatform(context, MainActivity.GOOGLE_CLIENT_EMAIL, MainActivity.GOOGLE_PRIVATE_KEY, MainActivity.GOOGLE_PROJECT_ID); break; service = new MicrosoftAzure(context, MainActivity.AZURE_ACCOUNT_NAME, MainActivity.AZURE_ACCESS_KEY); break; service = new Rackspace(context, MainActivity.RACKSPACE_USER_NAME, MainActivity.RACKSPACE_API_KEY, MainActivity.RACKSPACE_REGION); break;