About 100 lines of boilerplate API code rewritten from C# to Python

Ukończone Opublikowano Jun 4, 2013 Płatność przy odbiorze
Ukończone Płatność przy odbiorze

I have an API with sample code in C#. I would like the sample code to be rewritten in Python 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 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.

Forgot to mention, for your current timestamp, use the current UTC time.

Programowanie w C# Python

Numer ID Projektu: #4590189

O projekcie

8 ofert Zdalny projekt Aktywny Jun 6, 2013

Przyznany użytkownikowi:

suriyant

I can do it.

$157 USD w ciągu 3 dni
(16 ocen)
4.3

8 freelancerów złożyło ofertę za $255 w tym projekcie

ZergezChateau

I can help you with that project.

$608 USD w ciągu 43 dni
(1 Ocena)
4.0
ddhnyh1

Hi. Please check my pm.

$157 USD w ciągu 3 dni
(4 Oceny)
3.9
vladang

Hi. I am interested for this job

$277 USD w ciągu 10 dni
(10 Oceny)
3.3
Bramfeld

As experts in Python and HTTP, we could solve this task to your full satisfaction.

$250 USD w ciągu 5 dni
(1 Ocena)
2.5
tuanlm101

Hi, I can convert C# to Python with ease, as this is my expertise area.

$150 USD w ciągu 5 dni
(1 Ocena)
1.2
zaheerahmad01

HI, Please see PMB.

$188 USD w ciągu 10 dni
(0 Oceny)
0.0
cnobile2013

I am an experienced software engineer and have been in the business many years. My expertise is in web services. Python is my primary language which I have been doing for over ten years.

$250 USD w ciągu 5 dni
(0 Oceny)
0.0