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

Selesai Dipasang Jun 4, 2013 Dibayar saat pengiriman
Selesai Dibayar saat pengiriman

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.

Pemrograman C# Python

ID Proyek: #4590189

Tentang proyek

8 proposal Proyek online Aktif Jun 6, 2013

Diberikan kepada:

suriyant

I can do it.

$157 USD dalam 3 hari
(16 Ulasan)
4.3

8 freelancer rata-rata menawar $255 untuk pekerjaan ini

ZergezChateau

I can help you with that project.

$608 USD dalam 43 hari
(1 Ulasan)
4.0
ddhnyh1

Hi. Please check my pm.

$157 USD dalam 3 hari
(4 Ulasan)
3.9
vladang

Hi. I am interested for this job

$277 USD dalam 10 hari
(10 Ulasan)
3.3
Bramfeld

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

$250 USD dalam 5 hari
(1 Ulasan)
2.5
tuanlm101

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

$150 USD dalam 5 hari
(1 Ulasan)
1.2
zaheerahmad01

HI, Please see PMB.

$188 USD dalam 10 hari
(0 Ulasan)
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 dalam 5 hari
(0 Ulasan)
0.0