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
1answer
37 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.
...
0
votes
0answers
31 views
Feedback on my API Design [on hold]
I am designing an API for a driver that manipulates HW. I have done the following:
...
1
vote
0answers
31 views
Unit of Work + Repository Pattern + Stored Procedures
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.
...
1
vote
3answers
60 views
Optimization and accepted paradigms
This project was completed as part of an interview challenge.
The feedback I received was:
The code is neither optimized nor does it follow generally accepted paradigms, naming conventions or best ...
2
votes
2answers
43 views
6
votes
2answers
50 views
Clean and tidy Python code for dictionary look up and API interactions
I am new to programming and entirely self-taught. Below is a program I wrote to retrieve text content via an API and scan the text for important words. If the word is found URI is returned. The API ...
4
votes
1answer
75 views
Using the Rotten Tomatoes API
This is a Python module I made to search the Rotten Tomatoes movie API. It caches the search results in a SQLite database.
What improvements can I make to the cache system? Is there a better way ...
2
votes
1answer
53 views
Member restricted game with API
My website is poorly coded.
The structure is pretty simple:
A RewriteRule redirects /.... to /index.php?page=$1
mypages/page.php contains the page content and actions (model controller and view ...
6
votes
1answer
135 views
What is the proper naming of classes and method when designing API for calculation library?
I'm working on library which will provide easier writing and calculation in Java using fluent API.
Library I have implemented with basic functionalities and now I am working to improve API.
I ...
3
votes
1answer
40 views
Lunr backed client side search module
I created a client side search module. Could anyone please provide review pointers on it?
...
4
votes
2answers
40 views
Extracting ids out of arguments of different types
I'm building a Ruby API client. My brief is to extract ids out of various inputs and fetch the relevant data. It's working just fine at the moment but I think it's a little clumsy.
My specs (which ...
5
votes
1answer
59 views
AngularFire Tic Tac Toe Game
I am building a Tic Tac Toe game with AngularJS and making it online playable with AngularFire. The Tic Tac Toe logic is all there so this question concerns Angularfire a little bit more. I want to ...
3
votes
1answer
162 views
Simple REST API server
This is a chunk of code I wrote for a job interview at some point - it is a remote key-value storage REST API supporting CRUD operations.
Maybe anyone has some feedback on this? It would be very ...
8
votes
2answers
228 views
Django API Implementation
I am building a backend to a mobile application that will be hosted on a Django site connected to a PostgreSQL database.
I have never built anything to accomplish this before and this is my first go ...
2
votes
1answer
58 views
Drag and normal upload code
This is a partial code of my JavaScript app.
The openDoc function's task is:
call newDoc if use uploads a file through ...
5
votes
1answer
165 views
Reducing complexity of method
I'm trying to reduce the complexity of some methods, and I'm not exactly sure what approach to take. I'm currently building a PHP wrapper for a REST API, and the main problematic class is here:
...
1
vote
1answer
108 views
Orchestrate.io Client API Design
I've written a Python client for a new NoSQL database as a service product called Orchestrate.io. The client is very straightforward and minimal. It uses the requests library, making the underlying ...
4
votes
1answer
168 views
PHP wrapper around an API - best practices
Here's a PHP wrapper around a public OAuth2 REST API. I would love to hear your thoughts and comments. Testing was a bit frustrating since I tried for my first time. Not sure if I have done the ...
2
votes
1answer
51 views
7
votes
2answers
123 views
Java API without exposing implementation details
I am creating an API for consumption by other developers to interface with an internal framework. My goal is to be able to have the developers type something like:
...
5
votes
1answer
297 views
XLSX writer implementation
We have multiple scripts which write into XLSX with the same format, into a different format or slide variation. I am trying to write an API which saves time for other programs, but I need input on ...
10
votes
4answers
217 views
XmlCmdBuilder - doing away with inline xml
I have to work with a 3rd-party API that allows me to define and execute "commands", using XML. Since I don't like seeing mixed abstraction levels, I managed to remove all the inline XML / string ...
2
votes
1answer
129 views
Generic java configuration class with type safety
In the first code snippet I am creating a generic class to hold configuration details. I am currently using it as a way to pass run time configuration options to plugins in a generic manner. The ...
5
votes
2answers
104 views
Is the public interface easy to use and the documentation understandable? Are the unit tests well-written?
I have a year or so of experience in developing in Java. I submitted the solution for this task, but never got the feedback that was promised. Since I still would like to get a feedback on my ...
6
votes
2answers
348 views
My API Keygen: Is it secure?
Below is an api key gen script for a cryptocurrency trading platform i am building.
first it checks to see if a key exists in the db for the user id. if it does exist it displays the key. if it ...
0
votes
1answer
46 views
Evaluating a hashing function used to create secure API key
What are your thoughts on the following code? is it secure enough?
Note: $password is used to represent the secret, which would essentially be a SHA512 hash of
...
1
vote
1answer
47 views
Working with APIs in javascript
I'm not new to programming, but I am new to working with javascript (beyond copy/paste and simple edits).
I am building a one-page JS app similar to redditinvestigator.com, and my goal is for it to ...
3
votes
2answers
115 views
Structure of API wrapper
I'm building an API wrapper for a bookkeeping SOAP API.
I have some questions regarding bast practice for structure of the wrapper and for error handling.
For now i've structured it like this:
...
4
votes
1answer
180 views
In-memory data cache architecture for data transfer
I am writing a cron job to manipulate and transfer remote data.
I need to cache data from a table, process it, merge with previous table, iterate the process, and eventually send the result data to ...
2
votes
1answer
116 views
Rails 4.0 api_key implementation
I'll be brief and let the code speak for itself. I need some very harsh, honest, blunt feedback on this code. I am new to Rails - don't hold back.
I have a concept of the user having many API keys, ...
3
votes
2answers
665 views
Multiple serial URL requests in Objective-C / iOS
I want to check the existence of various API endpoints by doing serial URL request. If the first one fails, I want to try the second one, if the second fails I want to try the third one, etc.
Here is ...
2
votes
1answer
67 views
RESTfulPHP / controller / structure
Allow for stuff like:
API/ExampleObjects
API/ExampleObjects/SOME_INTEGER_ID/Children
...
with children knowing their owners (aka parents).
Full repo here
Please be brutally honest if something ...
1
vote
1answer
496 views
Node.js DynamoDB callback
I am writing an API which gets results from a DynamoDB table and puts the JSON back into the browser.
The code below works and returns the desired results. However, after reading about async and ...
3
votes
1answer
166 views
Python Leafly API
Just wondering what I did bad/could have done better. It's a simple script for pulling information from Leafly about cannabis strains. I've also added in a function to search. I am fairly new to ...
1
vote
1answer
618 views
Python API client design and best practices
I'm creating a Python API client, after thinking and checking some open source Python clients I created this class, and I'm looking for any feedback (design, best practices...), this is an example URL ...
6
votes
2answers
676 views
WebAPI - Return models vs entity and partial class with meta data
Wanted some opinions on something I have been working with, I've tried a few ways of structuring the way I retrieve and return data to my WebAPI, and I'm pretty happy with what I have so far, but I ...
2
votes
0answers
87 views
node.js Review Core class of a Javascript framework for SPA's
A few years ago I started building a tiny (~300 SLOC) JavaScript framework for scalable and maintainable Single-Page-Applications written in CoffeeScript:
https://github.com/flosse/scaleApp and ...
1
vote
1answer
261 views
Code review on an API wrapper in C# wanted
I'm looking for remarks on pretty much anything. This has been my first project that's meant for use by others and I'd like to have it as clean as possible. I will post the main source code here but ...
10
votes
2answers
274 views
Date Format provider
I am facing a issue with an API to handle dates in Java. I am not a very experienced programmer and my English is very bad.
Problem
I'm working in a large project with many subsystems, and I want to ...
0
votes
2answers
55 views
the right way to write javascript client's method for channel subscribing
I am writing an open-source application for real-time messaging in web. In my application clients from browser can subscribe on channels. But every channel belongs to a certain namespace which ...
1
vote
1answer
483 views
C# Fluent API idea
I've been toying with an idea for fluent API for my library. Basically, what you need to construct with my library is a tree, which might have nodes of different types on different levels. The problem ...
1
vote
0answers
26 views
Providing a Protected Global API to Third-Party Widgets [closed]
I am creating a Web Application which provides a global Javascript-based API (in the variable System) and it includes methods that will be provided by frameworks ...
2
votes
1answer
113 views
How can I refactor Api::SessionsController?
I have session controller for mobile devices. I would like to refactor it a little, for example because my session controller is sub class of ...
0
votes
1answer
131 views
How should I refactor my image uploader script?
I come from a C background and need help refactoring the following imgur image uploader script I wrote.
It checks if a token_file with ...
0
votes
0answers
266 views
Script is extremely slow to display results
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 usernames ...
2
votes
1answer
151 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
218 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
94 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
69 views
Designing a RESTful API for a 3D Printer [closed]
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 ...
2
votes
0answers
67 views
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 ...