API stands for Application Programming Interface. A program's API defines the proper way for a developer to request services from that program.
1
vote
0answers
6 views
RSpec integration tests for a simple Rails API
The Model is simple. A Player class with three attributes: first_name, last_name, and team_id.
I'm just trying to get a handle on TDD for what will expand into a much more robust API. Below is my ...
-2
votes
0answers
20 views
Response Requested is blank while Response Code is 200 [closed]
Hi I am trying to integrate the API with Java code , In my call I am having response code as 200 but the rawBody / JsonObject are all blank with respose body as []
input parameters are "soap" , ...
3
votes
1answer
32 views
Feedback on my Perl wrapper library (written using Moose) for a REST API
I wrote a wrapper library for a REST API (https://semantics3.com) in perl using the Moose library. I would like to gather some feedback on it (mainly on the oop part since I am new to moose), before ...
3
votes
1answer
45 views
Protecting certain model attributes from being exposed in an API
There can be a business or security requirement that certain fields on a model should never be exposed in an API. One approach to this is to tell the developers not to ever put the field in the API ...
5
votes
1answer
54 views
How can I optimize this linspace method build in Python's C API?
Today I built a linspace function in Python's C API, here is its code:
static PyObject *
linspace(PyObject * self, PyObject * args)
{
int n, i;
double start, end;
if ...
3
votes
1answer
83 views
Unit Testing Code that Calls RESTful API
So I'm writing a library which calls a RESTful API and then performs some work on the data. I've architected my code like this:
I have a class, let's call it APIRequestor that initiates a call to the ...
0
votes
1answer
137 views
Using tumblr API via php [closed]
I want to work with the tumblr API, however it looks like I failed at it yet. Do you have any clues for me?
<?php
/**
* User: dmendek
* Date: 18.07.12
* Time: 16:09
*/
class tumblrClass {
...
1
vote
1answer
103 views
Help with Zend Framework getAction method
I am new to MVC and Zend, so I have little idea what I am doing at the moment, but here is my question.
The following code is my get method for an API I am attempting to build in order to learn both. ...
1
vote
3answers
98 views
Fail-safe remote API operations - best practices
I'm working with two remote APIs, one which manages customers, the other (a Paypal API interface) which manages billing. To delete an account, I must delete the records from both.
function ...
1
vote
0answers
103 views
Markov Encryption API in Python 2.5
The module in question provides classes used to execute Markov encryption and decryption on arrays of bytes. ME was inspired by a combination of Markov chains with the puzzle of Sudoku. This version ...
0
votes
0answers
60 views
XML to JavaScript library design
I created a small library to parse xml to javascript. Can anyone tell me if the design is correct for a library? or if there is a better technique.
I wrote a small Usecase example here.
...
2
votes
2answers
96 views
Two similar API calls PHP optimisation and structure
I have the following script that I'm part way through and I'm not happy with it at all, it feels messy:
<?php
class Process {
public $search = ...
3
votes
0answers
94 views
luaproxy, (semi) automatic exportation of C++ classes to Lua
I'm writing a library that would ease the exportation of C++ classes (that is the definition of their members) to Lua. It originated from the need of tidying up the code for a server mod of a open ...
1
vote
2answers
114 views
Ruby - class definition for connecting to external API
I've defined a Client class to connect to an external API. The Client class will return XML responses for various resources. Here's what it looks like now:
require 'nokogiri'
class Client
...
0
votes
2answers
95 views
Interface of a variant-like class
I have created an NBT format reader (NBT is a binary serialization format that Minecraft uses to store its data). I made a node-like class that can be a data entry or the root of a subtree (that's how ...