API stands for Application Programming Interface. A program's API defines the proper way for a developer to request services from that program.
3
votes
1answer
50 views
One time key for authentication
In a recent project I was to create a web service that would be consumed by another application. One of the requirements was to have a key in the service that authenticated the request as valid. But ...
5
votes
1answer
51 views
Small Python script using Google and Slack APIs
I've recently been working on a small Python script that I was tasked to do at my new job. It will basically handle the rotation and notification of the on call engineer by populating a Google ...
1
vote
0answers
37 views
Haskell ERP (API Backend)
I'm building a mini ERP, with some basic functionalities, I'm doing the Back End in Haskell. However, my code feels very imperative, so any tips and critiques will be highly appreciated.
Repo: https:/...
0
votes
1answer
27 views
PHP Communicator SOAP api SDK
This is part of a SDK for interacting with Communicator's SOAP api.
The aim is that the user will not have to interact with SOAP (some people complain about it).
Please note that the wired ...
4
votes
1answer
39 views
JS Data Fetcher and Stripper for Statistics App
This is pretty much the first actual (not "hello world") program I'm writing. It's a rewrite of this app and my aim was to increase the fetch speed, and increase the cache storage efficency. I've more ...
-1
votes
0answers
24 views
Delegating raise of exception to client code [closed]
Suppose I want client code to override exception behaviour. What is the most appropriate way of doing this? It is understood that the callback must not return to its caller: It should either abort, or ...
-4
votes
0answers
31 views
API for subtitle conversion in PHP [closed]
I have made a converter for subtitles in PHP. Can something be improved in this API? Would you do something differently?
GitHub
...
3
votes
1answer
57 views
Haskell REST API + PostgreSQL
I'm making some small REST API, which I have never done before. I've got some basic stuff working.
Now my job is to add new entities to this, but all my work is reduced to copy-pasting code I have ...
4
votes
2answers
110 views
RESTful APIs (Create, Read) with flask-restful
I wrote this simple API to be able to send logs from the client to MongoDB. Even though this works and fits my need, I would like to point out some concerns that I have regarding the following:
Is ...
6
votes
3answers
96 views
Getting weather data from Open Weather Map API
I'm trying to make a simple app in C# that gets the weather data from http://openweathermap.org/api (OWM).
Here attached are two classes that I use to initialize WeatherData for selected City and to ...
1
vote
1answer
87 views
User Authentication PHP script
few days ago i made small PHP Authentication API with all basic functionalities (log in, log out, registration, getting authenticated member) and i got suggestions that i should use prepared ...
4
votes
1answer
85 views
PHP Authentication API
I created small simple PHP Authentication API. I have a couple of scripts that I use for session, authentication and registration. Since I'm not an experienced backend and PHP developer, I wanted ...
5
votes
2answers
55 views
Rails API for communication between two Rails app where the former app posts data to the latter and the latter return a response
The Controller code for the first app to post data to another app
...
4
votes
1answer
118 views
Calling 5 APIs to pick the cheapest hotel prices
I am using 5 Hotels APIs and trying to combine and pick min price hotel with unique hotels from all APIs. I am following these STEPS
Call All 5 APIsand wait for response.
get all static data from ...
5
votes
1answer
142 views
Translating an inputted query to SQL
I'm working on a small RestApi that would be able to:
Interpret different query languages like ...
1
vote
0answers
84 views
Parse query filter expression from request URL
I am building a backend APi for which I need to extract query filters from request URL of following pattern:
...
3
votes
0answers
28 views
Perl nagios plugin to query an api, obtain date from json, and determine if the date is within thresholds
This is an update of Using an API to obtain JSON data and get the date string and determine if data is stale
This is a nagios check that will use an API URL, get JSON data, flatten the data into a ...
6
votes
2answers
57 views
Using an API to obtain JSON data and get the date string and determine if data is stale
This is a nagios check that will use an API URL, get JSON data, flatten the data into a usable perl hash, and ultimately obtain a date string. Once the date is obtained, it should recognize the ...
2
votes
0answers
46 views
Requesting information about people from a web API
I'm requesting from a web API information about 20,000 people that I need to update continuously at lightning speed (the web server doesn't throttle the number of requests). I can request an update on ...
6
votes
1answer
70 views
Library to be used against a specific REST web service
I have been trying to generate a basic library that I can use at work, to call different REST calls towards a software vendor that we are using.
I would love someone's opinion on it, and what I could ...
1
vote
1answer
34 views
Select comparison function for sorting based on type information
So I'm working on a patch for the python interpreter where you go through the list and look at the types of the elements and try to use optimized special-case comparison functions that are much ...
1
vote
2answers
87 views
Logging all API call traffic in Java servlets
We have a few servlets like the one below, taking JSON request and produce JSON response. And the requirement is to log all API call traffic.
...
4
votes
1answer
68 views
PHP secure server2server communication
I read a lot about security mechanisms used in different APIs. But I'm still wondering if my own implementation is secure or not since it seems that there will ever be a risk of something you forgot .....
1
vote
1answer
70 views
Get data from external API
app.js
var employees = require('../models/employees');
employees.read(req.params.id, function(body) {
console.log(body.firstName);
});
models/employees
<...
2
votes
1answer
123 views
The Telegram bot for book information
Telegram Bot that retrieves book information from GoodReads
I've created a Telegram bot that implements the inline/offline modes to get the brief info about a book, searched by title(inline mode) or ...
3
votes
0answers
37 views
Uploading series of large files to API via Node
I wrote a node script to traverse a folder of hour-long mp3s and upload them to Mixcloud via their API. It works, but I suspect it's fairly inefficient - the computer it's going to run on at our radio ...
4
votes
2answers
153 views
Telegram Bot that retrieves book information from GoodReads
The project below is about a Telegram bot that implements both inline and offline modes. The idea is to get a brief info about a book, searched by title(it's author, rating, short description). I ...
4
votes
1answer
50 views
GET event handler
I'm working on my first NodeJS / Express application with the async module. It's been an uphill battle for me learning node (and even JavaScript) as I go along so I'm sure there's a lot of room for ...
3
votes
2answers
52 views
Parsing and saving JSON result from GoEuro API
I am new to python so I decided to write a script that parses a json array and writes data in a file.
I wrote the code that does that but I think it can be done way better, So I was hoping to get ...
6
votes
2answers
110 views
~600k external API requests for uploading part numbers to an inventory
I have a CSV containing ~600k part numbers to be uploaded to my website's inventory. However, this CSV only contains limited information. We're missing pricing and other related information. To get ...
4
votes
1answer
61 views
Validating attributes of a page in Adobe Experience Manager
I am reviewing the following code written by a fellow developer. I am not an java expert but IMHO i did not feel this is efficient use of exceptions — the reason I feel so is:
The below code throwing ...
0
votes
1answer
65 views
JavaScript Weather App using 3 APIs
This is one of my first programs working with APIs and I was hoping to get some input in the form of suggestions, recommendations or corrections. The goal is to register the user location by IP, ...
2
votes
1answer
117 views
Combining json responses of recursive web service calls with PHP and curl
I'm implementing the Hotel Price List API from Skyscanner. This requires a first call to the service to implement a session followed by 1 or more calls to the service to get the actual results. I've ...
4
votes
1answer
166 views
Script to send push notifications using email, Pushbullet, or Pushover
I have built a tiny script to send out push notifications. I would be glad to receive general suggestions / feedback.
My main problem is that the only security offered is coming from the OS ...
1
vote
1answer
68 views
RESTful backend API for user account
I have made a RESTful API built with Node.js, Express, Basic-auth and Mongoose. it will respond JSON.
This is the folder structure:
...
2
votes
0answers
35 views
Java interface to C library - Refactoring to singleton usage
I am currently writing a Java interface to a C library. It mostly just delegates calls and adds a object oriented layer on top of it to make integration into a regular Java program more natural.
The ...
4
votes
2answers
82 views
Basic API wrapper around a Restful service - follow-up
This is a follow up from my previous post: Basic API wrapper around a Restful service
I'm writing a basic wrapper around a restful service that returns a list of Stores. Naturally, I want to make it ...
7
votes
1answer
179 views
JSON REST client proxy generator
Trying to create something really lightweight. Sources are on GitHub.
To create a proxy we need to define an interface first, e.g.:
...
3
votes
2answers
334 views
Basic API wrapper around a Restful service
I'm writing a basic wrapper around a restful service that returns a list of Stores. I'm using RestSharp which I'm injecting into the class.
Naturally, I want to make it completely testable (that's a ...
3
votes
2answers
235 views
C# Async Oauth API Wrapper Class
Two quick notes: I'm targeting 4.5, and the server already has newtownsoft's json library. I'd prefer not installing anything additional on the server.
...
0
votes
0answers
250 views
Rest API with Node/Express/Mongoose/Passport from job interview
Introduction
I've got this mail for an assignment for a job position.
It's not relevant for this job anymore. But I like to use this opportunity to improve myself in coding and would like to know ...
2
votes
1answer
95 views
Weather API implementation
This class uses the openweathermap API to receive information about the current weather and forecasts. I am looking for any type of advice, but primary for structure and style improvement suggestions:
...
6
votes
2answers
126 views
Powershell cmdlet authenticating to Aerohive API
After dipping my toes in PowerShell for over a year i think it is time for creating a real cmdlet. My first mission was creating a regular PS script to take in a .csv and create a wifi account using ...
1
vote
1answer
46 views
Django class based view URL API
I kind of started making an API for my site in a Django class based view because it seemed logical and now it has gotten quite large and unruly and I am starting to wonder if I am doing this correctly....
5
votes
1answer
70 views
Python Politico API attempt
I love politics, and I love programming, so I figured why not try and combine the two for something to do? I'm making a work-in-progress (but runnable at this stage) Politico api that I call "...
2
votes
2answers
1k views
Calling Web API from MVC generic way of approach
Our Project architecture is AngularJS + MVC + WebAPI. Angular JS would call MVC action and MVC action further calls API methods. Below are some of the action methods we used for calling api methods.
...
2
votes
0answers
47 views
Adding or editing a child
I have a class which will add or edit a child. So whenever I click on "save," I need to check the child image. If it's an image, then I need to upload to the image server. Once that's done only, I ...
0
votes
1answer
54 views
List and post tasks with jQuery
I've written the code below to display a list of tasks from a Flask API. The form and associated .ajax method post to the API, immediately appending the data to the list of tasks. The code is working, ...
5
votes
1answer
566 views
Random quote generator from API
I have built a random machine generator website. It fetches the quotes from forismatic and has a button to get a new quote. When it gets a new quote, the website color changes. It also features a ...
9
votes
2answers
425 views
Responding to API requests with much complexity
So having used the SE API multiple times, I like how all responses are in a Wrapper object, and for my own API design I figured it was a good method to follow.
Of ...