The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [api]

API, for code implementing (not using) an Application Programming Interface. A program's API defines the proper way for a developer to request services from that program, site and/or service.

Filter by
Sorted by
Tagged with
3
votes
2answers
8k views

RSpec integration tests for a simple Rails API

The Model is simple: a Player class with three attributes: first_name, last_name, and ...
4
votes
2answers
506 views

Python wrapper for the Help Scout API

I started porting an API wrapper from Java to Python for practice. I am looking for ways to improve the readability/maintainability this code. I have done some reading about "pythonic" style and I am ...
3
votes
1answer
223 views

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
737 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
7k views

Unit testing code that calls RESTful API

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 ...
3
votes
1answer
886 views

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
260 views

Fail-safe remote API operations for managing customers and billing

I'm working with two remote APIs: one which manages customers and the other (a Paypal API interface) which manages billing. To delete an account, I must delete the records from both. ...
2
votes
2answers
248 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: ...
2
votes
2answers
620 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: ...
1
vote
2answers
427 views

Interface of a variant-like class [closed]

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 ...
6
votes
1answer
143 views

Registering layers in a web mapping library. API design [closed]

I am working on a web mapping library, that makes it possible to create a map with SVG and JavaScript. As every map shall consist of SVG and Image elements, which can be grouped in layers, which in ...
1
vote
1answer
518 views

FileMaker PHP API Interface v1.6.3

I previously wrote the question about version 1 of my code, since then I have released a version 1.6.3. I would just like everyone's opinion on it. Here is the old question: FileMaker PHP API ...
6
votes
1answer
184 views

Atomic elements selector engine

I've written a DOM element selector engine that I'm really quite happy with, and I'd love to hear some opinions on it from my fellow JavaScripters :D It's called Atomic, and I've got a repository for ...
3
votes
1answer
6k views

Java Slick 2D Collision Detection Methodology

I have a collision detection for terrain setup (non-terrain is handled with a quadtree I implemented apart from this) and I was wondering how others have done it compared to mine and what I could ...
1
vote
1answer
339 views

Java API code with Spring

Model: ...
2
votes
2answers
179 views

Refactoring Logger interface to open and close logs

I asked a question about an implementation of a logger using syslog and error_log as fallback that made me re-evaluate my ...
4
votes
1answer
707 views

Store all entries in a single array from Wufoo api

What I'm doing Using the v3 of the Wufoo API to retrieve all entries and store in a single array ($all_results). This is necessary because of the limit 100 entries limit that Wufoo has when ...
3
votes
2answers
870 views

Generated social media links

I'm still fairly new with JavaScript, and wrote something to generate some social media links on my page. The idea was to have that script grab the necessary URL info and feed it to the social media ...
7
votes
3answers
3k views

Google Weather API wrapper

I'm an amateur programmer (self-taught). Anyway, this class provides a few methods to access Google's unofficial weather API. I'm having trouble on how to go about handling parsing errors in ...
4
votes
2answers
2k views

Task scheduler API

I'm spec'ing out a API for a task scheduler and I would be thankful for your thoughts. This is what I've got so far: ...
3
votes
2answers
261 views
25
votes
2answers
2k views

C++ API for interfacing with Lua

I wanted a good way to move objects back and forth between Lua and C++, and I didn't want to use anything like LuaBind or the other available libraries I could find, so I instead wrote this. It's ...
6
votes
1answer
4k views

Interfacing with RESTful web services

The following working function seems a bit hacky to me as it has been pieced together from a handful of (probably poorly written) online tutorials, and I want to know if there is a better (or more ...
7
votes
2answers
593 views

Generating code with XML

I'm working on my graduate project and I had stumbled upon a somewhat dilemma, I've managed to solve it with some workarounds but I have my doubts that this is the most efficient way to deal with this ...
2
votes
3answers
262 views

Majorly refactored my code, is this good enough?

...
9
votes
5answers
3k views

Providing unchecked exception “wrapper” interfaces for an API with checked exceptions

I recently had a discussion in the forum of an API, because they changed an exception from checked to unchecked. I believed it needs to be checked, because it is recoverable. The arguments of "the ...