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

Completado Publicado Jun 4, 2013 Pagado a la entrega
Completado Pagado a la entrega

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.

Programación en C# Python

Nº del proyecto: #4590189

Sobre el proyecto

8 propuestas Proyecto remoto Activo Jun 6, 2013

Adjudicado a:

suriyant

I can do it.

$157 USD en 3 días
(16 comentarios)
4.3

8 freelancers están ofertando un promedio de $255 por este trabajo

ZergezChateau

I can help you with that project.

$608 USD en 43 días
(1 comentario)
4.0
ddhnyh1

Hi. Please check my pm.

$157 USD en 3 días
(4 comentarios)
3.9
vladang

Hi. I am interested for this job

$277 USD en 10 días
(10 comentarios)
3.3
Bramfeld

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

$250 USD en 5 días
(1 comentario)
2.5
tuanlm101

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

$150 USD en 5 días
(1 comentario)
1.2
zaheerahmad01

HI, Please see PMB.

$188 USD en 10 días
(0 comentarios)
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 en 5 días
(0 comentarios)
0.0