API stands for Application Programming Interface. A program's API defines the proper way for a developer to request services from that program.

learn more… | top users | synonyms

0
votes
0answers
28 views

enumerating windows to get process via c# & pinvoke approach

as i was trying to have a test and learn about native p/invoke functions i was trying to use only pinvoke and then compare the time it takes to get process info with .net simple Process myProc = ...
-3
votes
0answers
24 views

C# - How to pass API Url and fetch the comments from LinkedIn? [closed]

I am trying to get comments from LinkedIn that I have API. How to call that API and fetch the data from LinkedIn? Can anyone give an example? Thanks in advance.
-1
votes
0answers
14 views

GMail Snooze: How to remove the FollowUp label before placing the message in the inbox [closed]

I am not a programmer, but interested in getting a bit into coding. I found a very useful GMail script, and adapted it to fit in my workflow. The script does more or less the same as GMail Boomerang ...
0
votes
0answers
35 views

Twitter API PHP script is EXTREMELY SLOW … What could be causing this ? the page takes a long time to display results

So I have this PHP script below that requests data from the Twitter API and then displays it on the page according to the information that I have in my local database because I stored twitter ...
3
votes
2answers
109 views

Singly-linked List Library

This is sort of a follow-up to a post I created about 10 days ago, but I have completed the implementation: Designing function prototypes for a singly-linked list API in C. As I began to work on the ...
2
votes
1answer
53 views

Designing function prototypes for a singly-linked list API in C

I am in the process of rewriting in C all the data structures that I learned about a few years ago to increase my understanding of data structures and the C language. The first one I'm doing is ...
0
votes
2answers
75 views

How is this for an API structure

I have just written an API framework which I am hoping to implement into one of my large sites very soon. However, before I do so, I want to be sure that the script is well written and there are no ...
2
votes
1answer
63 views

Refactor code for API wrapper

I am looking for ways to improve my API wrapper for Pocket. So far, my code is quite compact and nice (I think), but I feel like there must be a better way to do this. This is the part where I think ...
1
vote
1answer
35 views

Designing a RESTful API for a 3D Printer

I'm implementing a REST API to manage a 3D printer, it will add a layer to the system so instead of sending GCode commands (the language the controller understands) directly to the controller (an ...
1
vote
0answers
31 views

Go: stream chaining

My goal is to have a reusable pattern for doing concurrent stream processing in Go. The stream has to be closable from any node. Errors should cleanly close the stream and forward the error to the ...
1
vote
1answer
98 views

REST-ish API Account Controller - how's it look?

I still have to implement api keys for client auth, but so far this is what I have for users. This was built using WebAPI and SimpleMembership with Forms Auth: Is Authenticated: public class ...
1
vote
0answers
45 views

General Code Review - Key Press Handler

I have made a class to import into my projects to more easily handle the state of the keyboard so I can use stuff like: if(Keys.returnKey(37)){ As opposed to setting up key listeners. Could you ...
2
votes
2answers
76 views

Is it ok to use PHP's strpos and substr altogether in one statement?

I am using PHP to build a REST API. I want to receive requests from the URL in the following format: http://mydomain.com/api/format/method?app_id=value&call=encrypted_request So, I have modified ...
3
votes
1answer
96 views

how can i make this small jQuery serializeobject util any better

I have this little utility/helper which serializes a form into a javaScript object $.fn.serializeObject = function(fn) { var o = {}, a = ...
5
votes
0answers
173 views

Doubts about the quality of an API designed for use with minimal effort

This is going to be long, and I do hope it is going to make some kind of sense; I apologize if it doesn't. I'll try to provide exactly the amount of context that is necessary to understand the ...
2
votes
0answers
71 views

jQuery plugin boilerplate jquib - critics please

Inspired by jqueryboilerplate.com I extended their boilerplate to fit my needs. Comming from the PHP development I wanted to have good starting point for writing jQuery plugins with a defined ...
3
votes
2answers
361 views

Backbone.js Dependency Injection API Design

I'm writing a dependency injection plugin for the Backbone javascript framework, and I'm not sure what the API for constructor argument injection should look like. Just for reference, Backbone ...
1
vote
2answers
113 views

How can this code become cleaner and less error prone? Especially the binary search part

How could this code become cleaner? I think that the way I handle the interfaces and binary search could be improved. I am trying to understand how to structure such a code 9and usage of APIs) in a ...
0
votes
0answers
406 views

User management in Node.JS

I have moved all my webserver code dealing with user management into a single Node.JS module that I paste below. I have spent time polishing it, and churned it through JSHint. I am generally happy ...
0
votes
1answer
65 views

(revised) Python script to access genealogy api for list of users and attributes

The problem the code is solving This is a script to access the stackexchange api for the genealogy site and create a list of user dictionaries. Ie each user dictionary contains the info about that ...
0
votes
1answer
85 views

Accessing a REST API with PHP

I'm currently using a scientific information management system that employs a RESTful API. I've never used this API with PHP, and I had a hard time finding best practice examples online. After some ...
1
vote
1answer
120 views

Is there a better way to loop through records and call an api?

I have a CakePHP function here that gets info for a twitter screen_name from the twitter api and writes it to a mysql db. I'm just looking for feedback about other ways to accomplish this that might ...
2
votes
1answer
160 views

Creating JavaScript API for first time; request review

I am creating a commercial API for the first time for responsive webpages/web applications (mobile devices). I am new and, sadly, working alone as well as new to Javascript (long complicated story). ...
1
vote
2answers
225 views

PHP api design - anything done badly?

I have created an api in php and I was hoping some clever individuals would mind reviewing it to see what I could do better. I have commented it heavily to explain my reasoning. please feel free to ...
0
votes
0answers
52 views

Javascript API - Library Loader

What my API does and Why - A Brief Explanation I have written a Javascript API that loads and houses libraries of code to do all sorts of things on websites. Effectively, this is (will be) the base ...
1
vote
0answers
83 views

MixpanelAPI - my first open source project

I would love to hear feedback on my first open source project (a very simple async API for Mixpanel) It implements a REST client for this REST HTTP API Review requested on the following aspects: ...
2
votes
3answers
168 views

ACM API based Java exercise

I came across an exercise (in the book "The Art and Science of Java" by Eric Roberts) that requires using only GArc and GLine classes to create a lettering library which draws your initials on the ...
4
votes
1answer
150 views

Loading Javascript Libraries with PHP API

First question on this site so please take it easy on me and let me know if I infringe the common etiquette :-) I have written the following script which simply: Loops through javascript files ...
2
votes
2answers
302 views

Review My Custom Streaming Application - AJAX / TwitchTV

So I created this custom application and ported it into a few websites. It uses the TwitchTV API and pulls in active streams and the viewer count. The problem I run into is when the list gets so big ...
3
votes
2answers
2k 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 ...
3
votes
1answer
66 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
159 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
98 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
629 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
249 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 { ...
2
votes
1answer
217 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
133 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
125 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
81 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
170 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
146 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
167 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
150 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 ...
5
votes
1answer
100 views

Registering layers in a web mapping library. API design

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 ...
0
votes
1answer
256 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 ...
2
votes
1answer
4k 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
156 views

Java API code with Spring

Model: public class UserBean { @JsonProperty private String userId; @JsonProperty private int limit; @JsonProperty private int page; public String ...
2
votes
2answers
110 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 Logger interface. Before it simply forced a log($timestamp, $message) to be ...
6
votes
2answers
250 views

Javascript api design

I'm working on a site that has a few site design specific widgets like tabs, alerts, messages, autocomplete etc. Unfortunately they're either global functions: customAlert("message", "buttontext", ...
3
votes
1answer
240 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 ...

1 2