Questions tagged [api]

API, for code implementing (not using) an Application Programming Interface. A program's API defines the proper way for a developer to request services from that program, site and/or service.

Filter by
Sorted by
Tagged with
1
vote
2answers
477 views

Manually mapping complex objects using Windows Service & Shopify

I'm looking for guidance/review on an approach that I've taken. Structure Windows Service Shopify Module (API) Official Shopify API The Scenario Our Windows Service connects to the Shopify Module ...
6
votes
1answer
927 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
133 views

Send image between apps

I have an ASP.NET CORE API app and now I have an endpoint like: ...
3
votes
0answers
104 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 ...
3
votes
1answer
857 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
66 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
960 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: ...
2
votes
1answer
236 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? ...
3
votes
0answers
56 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
67 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? ...
2
votes
2answers
194 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
4k 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 ...
0
votes
1answer
588 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
41 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
99 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, ...
6
votes
2answers
496 views

Simple Graph in Python

Just the beginning of graphs API in Python: ...
4
votes
0answers
44 views

Texplode KotH controller

I am creating a KotH (King of the Hill) 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 ...
4
votes
1answer
145 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
66 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
416 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 ...
6
votes
1answer
2k 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
148 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 ...
2
votes
3answers
446 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
383 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
599 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
149 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
145 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 ...
3
votes
1answer
94 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 ...
2
votes
1answer
349 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 ...
5
votes
2answers
830 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 ...
7
votes
3answers
16k 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
368 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
144 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
776 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
267 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
329 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
661 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
149 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
377 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
52 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
599 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
38 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 ...
2
votes
2answers
268 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
94 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
584 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
644 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
251 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
613 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
58 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 ...