API stands for Application Programming Interface. A program's API defines the proper way for a developer to request services from that program.
2
votes
0answers
23 views
Restful API for parsing records
I'm trying to implement my own API. This code excerpt should show the basic working routines. The storage is temporary an in-memory-array and the only HTTP method for now is POST.
I outsourced the ...
2
votes
2answers
56 views
Removing nested for loops to hasten API call response time
I've got an MVC APU project that I'm working on to feed data to some JavaScript charts. This beast below takes nearly 1 second of server time to process before it is served to the chart. I know that ...
0
votes
1answer
21 views
2
votes
1answer
27 views
Uses game API to post stats about user when requested on Reddit
First Python script, so my code is pretty laughable. Sensitive information has been redacted. One thing that I'd like to point out is that there is an inconsistent use of '' and "". This is an old ...
8
votes
1answer
119 views
The effect of typing a sentence out
The following code is complete and works perfectly. What I want to do to is make it more modular in a way where I can use the code again - similar to an api. I also hardly ever code in javascript, ...
3
votes
1answer
112 views
Handling new user requests from a Swift client
I am starting to play with POST request to save in my server the user token so I can send push notifications in Swift (this is the swift code). This is the PHP file that processes the request (please ...
5
votes
1answer
45 views
Attempting a fluent API for creating random int arrays
I have attempted doing a fluent API for creating random int arrays, and the following is what I came up with:
fluent_arrays.h:
...
2
votes
2answers
78 views
REST API using PHP
I am trying to write an REST API using php from scratch which I am gonna use to play with Angular.js. It is working fine now and I need your opinions on the things I have done in this code to improve ...
2
votes
1answer
61 views
Web API controller to get details of a travel plan or a leave request
My web API has 3 controllers for get, post and users CRUD. I named it as DetailsControllor, FormControllor and ...
3
votes
1answer
72 views
Swift API controller
I've just started iOS development and learning Swift. My code below works, but I'm interested to know in ways I can improve it having no experience in iOS Swift prior to this attempt.
...
3
votes
0answers
35 views
Entity component system Lua API
The destruction of the objects are handled by the garbage-collector metamethod.
(Does this make sense? This means that an out-of-scope object will stay visible in game until garbage collection.)
The ...
1
vote
0answers
52 views
Imgur API implementation using Retrofit
I've recently (an hour ago) started a project for making a wrapper for Imgur's API using the REST client Retrofit.
I've only implemented a single endpoint so far as I'm questioning my design. While ...
0
votes
2answers
49 views
Should Domain objects for a public API be able to save/send themselves?
My main questions: FileWithSave handles its saving itself, but delegates it to a repository object. This allows implementation details to be available without being present in the API when saving ...
1
vote
1answer
25 views
Fetching ALL data set from API iterating via response data
Does this make sense? How would you achieve the same thing, with cleaner code?
...
1
vote
1answer
29 views
Naming a complex crud function
I have a function below that does the following uses a bunch of smaller CRUD operations which I call create, ...
10
votes
1answer
143 views
The thing that makes API requests
I'm creating a thing that does things. Part of the things the thing does is querying an API for information about movies and TV shows. The API allows me to query for changes to their data so I will ...
18
votes
3answers
445 views
Parsing log files of HearthStone: The log reading API
I'm still working on a parser that can parse log entries from a game called HearthStone, the overall idea is that it will read the log file live when the game is running, parses the log file and show ...
2
votes
1answer
1k views
PHP/Phalcon RESTful API architecture
I'm building a RESTful API in PHP using the Phalcon framework. The API will consist of multiple modules (e.g. api.example.com/mail/users, api.example.com/web/users, etc). So I want to put all module ...
11
votes
2answers
402 views
Parsing log files of HearthStone: The API
I am working on a parser that can parse log entries from a game called HearthStone, the overall idea is that it will read the log file live when the game is running, parses the log file and show ...
1
vote
1answer
58 views
Vimeo API - Loading videos
I know my way around jQuery and JavaScript a little bit but as for optimising, I'm a bit weak but willing to learn new stuff.
I'm currently loading videos onto our site from Vimeo when a user clicks ...
3
votes
1answer
274 views
Testable authentication handler for web API
I need to unit test my authentication handler. I don't really want do an assert against the text message returned by the handler. How could this be improved ?
...
10
votes
1answer
213 views
Inspector Rubberduck
Our Rubberduck open-source VBE add-in project is coming along nicely. One of the main features we're going to be implementing in the next release, is code inspections.
I started by defining an ...
5
votes
1answer
199 views
Sliders library
I have completed working on my own pure JavaScript Slider library and would like to get some input from other developers. I would like to know how you would improve the code in any way.
...
2
votes
1answer
114 views
This brittle OData to SQL Server C# code isn't sustainable over time
The intent of this code is to access a third party OData API to capture only the relevant data to an existing in-house set of MSSQL server tables. Ignore the exception handling for now--the errors ...
2
votes
1answer
116 views
Node.js API route for POSTing a resource. Getting rid of callback pyramid
I'm writing an API for simple GET and POST routes. The app is a shared to-do-list. Users and lists are stored separately. A list can belong to many users, and a user can have many lists.
...
1
vote
1answer
120 views
Error handling in an Android API (class or enum)
I am developing an Android Library which will be distributed to other developers.
The library itself is a wrapper of the industry specific one. This makes the API development a bit less flexible. The ...
8
votes
1answer
279 views
JSON C++14 library API/implementation
I'm creating a C++14 header-only JSON library for fun, learning experience and to use it in my personal projects.
I'm looking for feedback on:
Its API/interface: since I'm using modern C++, I want ...
2
votes
0answers
37 views
Compressing a blog into a preview using tumblr_api_read
Here is what I have currently working. I would like to make it look more aesthetically pleasing, so not finish words in mid word. Also not have the two previews be so much larger than the other.
...
6
votes
2answers
194 views
Quiz Engine implementation
I'm trying to find a nice API for a Quiz Engine. This is what I have so far:
Implementation:
...
5
votes
1answer
122 views
Python wrapper for official Hacker News API
Since Hacker News launched their official API, I started working on Python wrapper for it. API v0 is fairly simple, you send a GET request with hacker news story's ID or user id, it returns data in ...
4
votes
2answers
108 views
Create User profile with separate social media data
I am creating user profile logic for a blogging platform. I have the UserProfile model and then two separate models, ...
4
votes
1answer
289 views
Steam API JSON Function JavaScript
Upon coming face to face with the mighty cross-origin request block, and needing to get a JSON file from an external source, I decided to use the Yahoo Query Language in order to achieve this.
I'm ...
3
votes
0answers
56 views
Python API for TreeStructInfo - new simple config format
I've created a simple (300 SLOC) API for a new configuration format (I'm not the author of it). Unfortunately, the specification is only in Polish at the moment, but you can see how it looks here.
...
4
votes
1answer
60 views
Post Service Class
I have one entity that depends on another however in my API service class I would like to just deal with the dependent entity. Am I doing this correctly and is there a better way to go about this?
...
2
votes
1answer
100 views
Expose only desired functions to 3rd party plugins in JavaScript
I tried to build a solution to dynamically load JS code, but to only expose predefined functions. Is this the correct approach? Is there any Method to execute arbitrary code if I put all my code ...
4
votes
1answer
686 views
RESTful API for Todos using Hapi
My goal is to create a simple restful api that will be accessed by an AngularJS front end. Even though it's fairly simple, I'd like understand how to make it more reliable, secure, and best-practices ...
6
votes
1answer
121 views
API for SQLConnect Library
I've designed a library for connecting Objective-C (and now Swift) apps to Microsoft SQL Server 2005+. (I believe there are other databases it works with, but I've only tested with MSSQL.)
The ...
10
votes
3answers
513 views
Building a better Collection. Enumerable in VBA
VBA's 'Collection' is.... lacking, so, I've been working on a better Collection object that implements many of the features of C#'s Enumerable. This is very much inspired by this question and a follow ...
10
votes
1answer
256 views
Nested Sets in JavaScript
I created a procedural implementation of the nested set model in JavaScript.
The use case for this small library was that the front-end(presented as an MVC) needs to traverse hierarchical data from ...
4
votes
0answers
289 views
Multi-dictionary API using Python Flask-RESTful
I'm working on a simple online dictionary tool, using Python Flask-RESTful as the RESTful API backend. The dictionary tool is modular, it can handle multiple dictionaries, implemented as independent ...
6
votes
1answer
629 views
Getting all likes from a specific user on a news wall with fewer graph API calls
Right now, my solution counting likes of a specific user is
Starting a recursive call on the "/{user-id}/posts" edge
Iterate through all posts
On each post iterate through each like on the likes ...
3
votes
1answer
73 views
Catching API changes for a service that doesn't version its API
I'm using the old Google Data API to access several spreadsheets and put their contents in a database using Flask and SQLAlchemy. Each run deletes the contents of the database tables and repopulates ...
0
votes
1answer
116 views
Bignum library with arbitrary bases
I just started development on a new bignum library that can operate on numbers of any arbitrary base (up to 232). I want to get a good idea of where I can improve before taking things any further. ...
5
votes
1answer
1k views
JavaScript Weather App
I am pretty new to JavaScript, and put together a weather application. I'd like to get some feedback on improvements I could make to the code itself and also possible ways to speed up weather data ...
3
votes
1answer
1k views
Python script which fetches Amazon product details using its API
This is a script which takes an Amazon URL as input, takes out ASIN/ISBN from the URL, and uses Amazon Python API to fetch details.
For this task, I looked at many Amazon URLs and observed the ...
1
vote
0answers
57 views
Is this interface structure/setup correct?
I'm working on wrapping the last.fm web API. I'm trying to use Interfaces to be able to easily make calls via functions which return an interface (as opposed to an object which would need to be ...
4
votes
3answers
140 views
Building SQL from multiple combinations of query parameters
I have a node.js/express.js based REST application. In one GET service I am querying data based on different set of request parameters. I am looking for a better way to implement it.
...
10
votes
2answers
741 views
Async wrapper around public API
Tear it apart. I'm mostly concerned around the appropriate use of ConfigureAwait(false), and possible poor handling and duplication of the ...
2
votes
1answer
1k views
Parsing ODataQueryOptions<T> to Expression<Func<T, bool>>
I am following up on this answer for a scenario that I am currently working on. Like the OP, I am too concerned about the longevity of the code.
...
5
votes
0answers
729 views
Unit of Work + Repository Pattern + Stored Procedures [closed]
I'm a beginner with ASP.NET Web API and the Unit of work + Repository design patterns. I've been reading a lot about ASP.NET Web API and I'm learning as much as I can so I can create a good web API.
...