GithubHelp home page GithubHelp logo

ffflorian / api-clients Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 9.0 14.04 MB

API clients for various services

License: GNU General Public License v3.0

TypeScript 96.67% Shell 0.39% JavaScript 2.94%
monorepo lerna typescript api-client cli absenceio c3nav corona-warn-app covid-19 icanhazdadjoke

api-clients's People

Contributors

aimon7 avatar alundran avatar boredland avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar ffflobot avatar ffflorian avatar lipis avatar nandertga avatar yurist38 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

api-clients's Issues

Package Error

I am getting internal package error. I am using vue3

 const Sp = new Statuspage('1zzpm59l36cj')
    Sp.summary({
      success: function(data) {
        console.log('Data', data)
        // adds the text description to the dropdown
        // $('.color-description').text(data.status.description)
        // appends the status indicator as a class name so we can use the right color for the status light thing
        // $('.color-dot').addClass(data.status.indicator)
      }
    })

image
image

Switch back to MIT license?

Hi,

I saw the license was changed from MIT to GPL-3 here, ba1fc4c. What was the reason?

Have you considered switching back to MIT? For Statuspage.io API? :) I'd like to use it but can't if it's under GPL-3. If not I still thank you for your hard work making these API clients!

[imgflip.com] need example with use of boxes

tried to used boxex like this:
imgflip.api
.captionImage({
username: 'test',
password: 'test',
template_id: 289894455,
boxes:[
{
"text": "One does not simply",
"x": 10,
"y": 10,
"width": 548,
"height": 100,
"color": "#ffffff",
"outline_color": "#000000"
}
]
// ...
})
.then(response => {
//
console.log(response);

        });

getting error response :
{
success: false,
error_message: 'Invalid box format. Each box in the boxes array must be an object containing the attributes text, x, y, etc.'
}

Bad usage of dependencies

I wanted to update a dependency recently but turns out I can't since your packages only allow the usage of one specific version of each dependency.
I suggest you change this

  "dependencies": {
    "axios": "1.6.2",
    "commander": "11.1.0"
  },

to this

  "dependencies": {
    "axios": "^1.6.2",
    "commander": "^11.1.0"
  },

I suggest you fix this in all your packages so people can swiftly update dependencies in the case of a security vulnerability.

Unable to search npms.io using specific keywords and operators

I'm trying to use the https://www.npmjs.com/package/npms.io client to search npms.io by a specific keyword and non-deprecated plugins: keywords:eleventy-plugin not:deprecated

If I was using the API directly, I'd use something like this:
https://api.npms.io/v2/search?q=keywords:eleventy-plugin+not:deprecated

I'm not sure how to do that w/ the NpmsIO client though. I tried this:

import { NpmsIO } from "npms.io";

const npmClient = new NpmsIO();

const plugins = await npmClient.api.search.searchPackage("keywords:eleventy-plugin not:deprecated", {size:250});
console.log(plugins);

โ€ฆ but it always returns zero results: { total: 0, results: [] }

If I remove the encodeURIComponent() from this line and just do q: query in my local ./node_modules/ folder, then I start seeing results:

q: encodeURIComponent(query),

- q: encodeURIComponent(query)
+ q: query
{
  total: 154,
  results: [
    { package: [Object], score: [Object], searchScore: 0.0007207585 },
    { package: [Object], score: [Object], searchScore: 0.00066178717 },
    ...
  ]
}

Make API URL accessible in Request Injector

It would be nice if the API url can be accessed from the request injector. Usually the request injector can use this.apiClient but the API client hides its options which also include the API url.

Issue with Axion client - API V1 call returns status 404 (statuspage.io)

The Axion client used in this client is fine, but it needs to have a change made to it.

In /statuspage.io/src/Endpoints.js it has an API call to the Statuspage API V1. This has now been removed and API V2 is the only one working. All V1 calls returns a 404 error. I went into the Endpoints file and ended up changing
const API_V1_BASE = 'api/v1' to const API_V2_BASE = 'api/v2' and replace all API_V1_BASE calls in this document to the new API_V2_BASE.

AbsenceAPI: TypeError: Cannot read property 'toLowerCase' of null

It crashes here:

Demo Code

import {AbsenceIO} from 'absence.io';

const absenceIO = new AbsenceIO({
  apiKey: 'MY-KEY',
  apiKeyId: 'MY-KEY-ID',
});

absenceIO.api.absence.retrieveAbsences().then(absences => console.log(absences));

Error

(node:15736) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of null
    at Object.exports.generateNormalizedString (D:\dev\projects\bennyn\wire-absence-bot\node_modules\hawk\lib\crypto.js:73:35)
    at Object.exports.calculateMac (D:\dev\projects\bennyn\wire-absence-bot\node_modules\hawk\lib\crypto.js:50:32)
    at Object.exports.header (D:\dev\projects\bennyn\wire-absence-bot\node_modules\hawk\lib\client.js:109:24)
    at D:\dev\projects\bennyn\wire-absence-bot\node_modules\absence.io\src\AbsenceIO.ts:35:38
(node:15736) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a pro
mise which was not handled with .catch(). (rejection id: 1)
(node:15736) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-
zero exit code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.