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
43 views
JSON Cache Program
I have some code that is intended to be a package (so that it can be accessed via import cachejson).
Here is the code for the package:
The update variable is ...
3
votes
0answers
25 views
oEmbed provider servlet to handle four media types
I would like to add oEmbed tags to my site (I'm the oEmbed api provider). My api should respond the results based on the file type.
oEmbed Types has
Photo
Video
Link
Rich
My response to photo ...
0
votes
1answer
14 views
Displaying API results inside a WordPress page template
I've created a WordPress page template that calls an API using Httpful and formats the results. This is my first time using APIs on a page, so I'd like to know if this is the right direction to go in.
...
3
votes
1answer
58 views
Ruby wrapper for Instagram API
I've created my first gem as Instagram API wrapper https://github.com/agilie/instagram_api_gem. I would be very pleased if you give me some feedback on code organization, methods elegancy and so on.
...
0
votes
1answer
44 views
Populate DataTable with API results
I am querying an API and populating a C# Datatable with the results, then using a Table Value Parameter to populate a SQL Server table with the results. This is my solution, but it is slow and takes ...
4
votes
1answer
29 views
AntiCSRF: simple CSRF token management for server APIs
I've been working on a full stack web application for a school project, and I wrote antiCSRF without prior experience or example code to prevent Cross-Site Request Forgery attacks, and to ...
12
votes
2answers
806 views
Current ISS latitude / longitude position
I'm looking into basic API examples and I've got the following to work as I want it to. Is there a better way to determine the direction of latitude and longitude? It feels like I could do it better.
...
0
votes
0answers
32 views
Adding a user via a NodeJS API
I have created an API route for adding new users. To use this, users must provide pre-existing authentication, and it is all over HTTPS.
These requires are named as the npm module is - ...
3
votes
1answer
67 views
A UNIX timestamp microservice
I have made a small timestamp microservice that converts from UNIX time to a natural language date, and vice versa. Please let me know of anything I could do better.
Here is a demo. Here is the time....
1
vote
0answers
46 views
REST API wrapper class with Alamofire + Gloss
I have come up with this structure to handle API calls using Alamofire + Gloss.
The multipart method I came up with was kind of in a hurry, it works but I think it could be done much better.
So this ...
-1
votes
1answer
44 views
Getting deceptive/malware content sites list with Google Safe Browsing v4 [closed]
First of all I am not a programmer. I am starting small project to kill time. I am using Google Safe Browsing API v4 in PHP to get the deceptive sites which contain malware. I searched on Google and ...
3
votes
1answer
55 views
Django Rest Framework Totaling API values in different ways
I am working on a stats website for my softball teams that I manage/play for.
Here is my current Stat model:
...
2
votes
0answers
57 views
4
votes
0answers
64 views
Load data from WebAPI to the ViewController
My current code working perfectly, it is for data load from web api to the UIViewController (UITableView).
But I am confused ...
2
votes
1answer
37 views
Creating a generic filter system to pass into an API request
I am building an application that will interact with an API.
My service layer will call the repository which will request data from the API.
I want to be able to pass filters to the repository and ...
3
votes
1answer
54 views
Query database and check server details
I have written bash script to query database and check server details.
Please let me know if the script is as per best standards:
...
1
vote
2answers
103 views
2Captcha API wrapper
So I've created an API wrapper for 2captcha in c# and I wonder what I can do do improve the code, make it cleaner?
Code:
...
0
votes
0answers
45 views
Call and parse an API request
I'm developing some API tests to a SOAP services. The class that performs the call to API is:
...
3
votes
1answer
58 views
A neighborhood map of things to do and eat in Downtown Las Vegas
I have been coding in javascript for almost a year now, and I would like your input on what I could do better. Also, any tips for organizing code a little better? Do you use MVC for every project? ...
2
votes
0answers
33 views
A function that debits a virtual wallet and calls an API to disburse to a real account
I am trying to determine if there is a better way to handle reversals for this function.
This is how it works:
A user inputs in amount, bank, and account number this would be used to debit his ...
6
votes
3answers
2k views
REST API to list books, where null means “everything”
My company has a REST API, and one design issue that has come up a few times is that we use null to indicate "get everything".
For example /api/books?genre=romance ...
2
votes
1answer
59 views
Get application credentials from linked array obtained from Cloud Foundry API
I am new to Java and I use the following code to retrieve parameters
from a linked hash map from the Cloud Foundry API. My question is if there is a better way to do it in Java?
...
3
votes
2answers
60 views
TranslateIt class using the Yandex translation service
I wrote a class TranslateIt for translating text files with Yandex.Translate service. I feel the code is rather bulky. Is it ...
5
votes
1answer
74 views
Currency Converter in Python 3
Beginner Python developer here.
I was tinkering around with Python and decided to build a currency converter. It takes in input from the user and prints out the converted currency values. The fixer.io ...
1
vote
1answer
62 views
How to optimize the Flask RestFul api
The tutorial is here
I want to build a RestFul API with Flask to query User Agent data. Curl script shows below. The api should work with three or two or one or even zero argument.
So how to change ...
4
votes
1answer
28 views
Ruby Twitter Search by punctuations
With twitter search the punctuation and special characters will be considered part of the term you're searching for, so searching for '#twitter!' will return '#twitter!', "twitter?', '#twitter', etc. ...
2
votes
0answers
75 views
Fetch object from database, or fetch it using an API if it isn't there
To give some background on this particular code, there is a controller which recieves an object, hashes parts of it and looks into a database to see if there is a similar hash in the db, if there is, ...
4
votes
1answer
63 views
0
votes
0answers
21 views
Texplode KotH controller
I am creating a KotH challenge for Programming Puzzles and Code Golf. Other site users will write programs that play Texplode (a version of this game on a square grid). The program works, but I don't ...
4
votes
1answer
72 views
pyvdp - Python library for Visa Developer Program
I'm coming from PHP and recently started developing in Python. As a part of my self-study course, I developed a small library for access to Visa Developer Program APIs and published it on Github. It ...
1
vote
0answers
24 views
ES6 template literal tag function and polyfil fetch
The goal of this is to create an easy to use front-end interface to work with graphql APIs. Can anyone tell me if there are any inefficiencies or areas of ...
1
vote
1answer
91 views
Slack App OAuth flow in golang
I'm working on a Slack app that uses Slash Commands. I've been looking for an excuse to learn Go, but the online tour was a little slow paced so I tried jumping in with this project.
I'm looking for ...
3
votes
1answer
103 views
Java 8 spliterator for paged results
Summary: I am using an API which returns paged results. I want to have these results as Java 8 Stream and implemented a ...
2
votes
0answers
47 views
First basic API using Flask with authentication
I've created my first basic API using Flask, that has the ability to create new tasks, delete tasks, update tasks, handles error pages, and has authentication required.
What I would like to know is ...
1
vote
3answers
126 views
Post method exceptions with “if else” statments optimization and json object improvemnt
I would like to know how to know how can I optimize my current Post method , I initialize object where I am creating list of json items. Also how can I reduce many if and if else statments? For this ...
4
votes
1answer
89 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
182 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
69 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
46 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
50 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 ...
3
votes
1answer
137 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
260 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
909 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
176 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
110 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
122 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
144 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
165 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
126 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
61 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 ...