GithubHelp home page GithubHelp logo

rates's Introduction

Header

CI Status Version

Rates 2 Rates 1

Listing Refreshing Delete Select Base Currency Add New Currency

API

This App uses api from Currency Layer, Please check their Documentation for more information.

SETUP

To configure the API, inside the Info.plist, under CurrencyLayer, replace #YOUR_API_KEY with your actual APIkey.

Example: ย 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	...
	<key>CurrencyLayer</key>
	<dict>
		<key>APIKey</key>
		<string>#YOUR_API_KEY</string>
	</dict>
</dict>
</plist>

Unit Testing

This project uses the concept of mocking the request to avoid the hitting the server while still using the actual API request calls. All requests from the APIService are all hijacked and replaced with the mock ones.

You can see all the response of the hijacked request can be found on mock-resources/api for more info. The Path and File under mock-resources folder represents the Actual Endpoint of the Request

Example: endpoint: /api/list

- mock-resources:
  - api:
    - list:

I'm planning to improve this by having a Code Convention for writting HTTP Response like adding custom Response Headers, react to diffrent HTTPMethod and Query Params, make it pluggable and easy to use. Please check this Hijackr for more info in the Future.

Please see the RatesTests target for more info.

Test results can also be viewed from Travis CI - Rates

Notes

  • The App will only execute the actual refresh only after 30 minutes from the last successful request to avoid reaching the rate limitation of the API.

  • Due to the limitation of the Free API Key from Currency Layer, switching the Base Currency other than USD will alert an Error message like:

    Access Restricted. Your current Subscription plan does not support Source Currency Switching.

    Rate Limit Error

    And to solve this issue, you have to subscribed to their Paid Service.

TODO

  • Test cases for Failed request.
  • Localization
  • Empty State for List
  • Custom Keyboard Input
  • UI Test cases
  • Additional tests for different iOS and Device version.
  • Reacheability.

Contact

Fore more information, please contact [email protected]

rates's People

Contributors

michaelhenry avatar

Watchers

James Cloos avatar  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.