About 100 lines of boilerplate API code rewritten from C# to Ruby - repost

Ολοκληρωμένο Αναρτήθηκε Jun 11, 2013 Πληρώθηκε κατά την παράδοση
Ολοκληρωμένο Πληρώθηκε κατά την παράδοση

I have an API with sample code in C#. I would like the sample code to be rewritten in Ruby and tested.

-- SpyFuApiRequestBuilder Class --

This will probably be the bulk of the work. This is where the request is set up. It has 2 headers, Timestamp and Authentication. You'll want to make sure the datetime formatting is identical, otherwise the request will fail. Then on the Authentication header, it's basically a keyed HMAC where you're concatenating request elements into a string, then hashing that string with a secret key. One thing to pay attention to here is the ordering of the elements - the ordering needs to be the same, otherwise you could end up with a different hash than the server for the same request data.

-- SampleRequest Class --

This class is fairly simple. All it does it use the SpyFuApiRequestBuilder class to build a request, then submits it, then verifies that it gets a reasonable result back.

-- Testing Notes --

You can use the same username and secret key that are in the C# sample code. The server won't accept requests where the Timestamp is not within 15 minutes of the server time, so you should probably use the current UTC time for each request you make while testing. Doing that should also avoid another possible little issue, which is that the server will only accept a given signature once (no repeated requests). If you just resign with a new datetime though, you should get a fresh hash that will work just fine.

Γλώσσα Προγραμματισμού C# Ruby

Ταυτότητα Εργασίας: #4613392

Σχετικά με την εργασία

1 πρόταση Απομακρυσμένη εργασία Ενεργό Jun 11, 2013

Ανατέθηκε στον:

suriyant

I can do it.

$126 USD σε 3 μέρες
(2 Αξιολογήσεις)
3.0