Coder Social home page Coder Social logo

rohaniadnan / xecd-rates-client-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xenonlab/xecd-rates-client-java

0.0 0.0 0.0 82 KB

REST Client

Home Page: http://www.xe.com/xecurrencydata/

License: Mozilla Public License 2.0

Java 100.00%

xecd-rates-client-java's Introduction

XE Currency Data Client - Java

XE.com Inc. is the World's Trusted Currency Authority. This project provides an SDK to interface with our XE Currency Data (XECD) product.

XE Currency Data is a REST API that gives you access to live and historic mid-market exchange rates between all of our supported currencies.

You will need an api key and secret to use this SDK. Sign up for a free trial or register for a full account.

Installation

The preferred way to install this package is from Maven Central.

To add a dependency on XECD Rates Client using Maven, use the following:

<dependency>
  <groupId>com.xe.xecd</groupId>
  <artifactId>xecd-rates-client</artifactId>
  <version>0.1</version>
</dependency>

To add a dependency using Gradle:

dependencies {
  compile 'com.xe.xecd:xecd-rates-client:0.1.+'
}

This package follows semantic versioning.

Usage

package com.example;

import com.xe.xecdApiClient.model.HistoricRatesResponse;
import com.xe.xecdApiClient.config.XecdApiConfigBean;
import com.xe.xecdApiClient.service.XecdApiService;
import com.xe.xecdApiClient.service.XecdApiServiceFactory;

public class Main
{
  private XecdApiService apiService;

  public void main() throws XecdApiException
  {
    XecdApiConfigBean config = new XecdApiConfigBean();
    config.setAccountId("<YOUR_ACCOUNT_ID>");
    config.setApiKey("<YOUR_API_KEY>");
    apiService = XecdApiServiceFactory.createXecdAPIService(config);

    try {
      HistoricRateResponse historicRateResponse = apiService.historicRate("CAD", "USD,GBP", "2017-09-14", null, 1.00, false, false);
    }
    catch(XecdApiException e)
    {
      System.out.println(e.getMessage());
    }
  }
}

Documentation

Technical Specifications

Contributing

xecd-rates-client-java is an open-source project. Submit a pull request to contribute!

Testing

cd xecd-rates-client-java

# Unit tests.
./gradlew test

# Integration tests.
export XECD_ACCOUNT_ID=<YOUR_ACCOUNT_ID>
export XECD_API_KEY=<YOUR_API_KEY>
./gradlew test

Security Issues

If you discover a security vulnerability within this package, please DO NOT publish it publicly. Instead, contact us at security [at] xe.com. We will follow up with you as soon as possible.

About Us

XE.com Inc. is The World's Trusted Currency Authority. Development of this project is led by the XE.com Inc. Development Team and supported by the open-source community.

xecd-rates-client-java's People

Contributors

mnesiem avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.