Giter VIP home page Giter VIP logo

wolframalphakit's Introduction

What is WolframAlphaKit?

WolframAlphaKit is an iOS shortcut that acts as something akin to a library, allowing your own shortcuts to:

  • perform a query against WolframAlpha;
  • optionally parse the response using your own custom JSONPath so you can retrieve additional details (e.g. images);
  • guide the user through the process of entering their existing WolframAlpha API key, or signing up for a new one.

WolfraAlpha has a free tier that allows for up to 2,000 queries a month. As it's a paid service, each user needs to sign up for their own key.

Installing WolframAlphaKit

The shortcut can be installed from the following link:

Install WolframAlphaKit

WolframAlphaKit behavior

When your Shortcut calls WolframAlphaKit, it first checks to see if you have an API Key.

User has a key

If you have an API key, it performs your query and returns you the result.

User does not have a key

If the user does not have a key, they are asked if they want to:

  • Sign up for an API key
  • Enter their existing API key

The Shortcut will then guide the end user through the process of signing up and / or entering their key.

Once added, the end user can make use of any shortcut that uses WolframAlphaKit to query the WolframAlpha service without having to re-enter their API key.

Example Shortcut

An example of a user making using a WolframAlphaKit based shortcut for the first time

Query WolframAlphaKit from your shortcut

To query WolframAlphaKit, you need to create a Dictionary with the following keys and value:

Key Value
action query
input Your WolframAlpha Query (e.g. Population of New York )
jsonPath (optional) The JSON path query used to return the result from the API response.

For those familiar the API response:

By default, WolframAlphaKit takes the plaintext subpods values from the Result pod.

You then run the WolframAlphaKit shortcut with the Dictionary as the input:

Dictionary as input

It returns a dictionary with exitCode and result values.

Key Value
exitCode Returns 0 for a success response or > 0 for an error.
result The result of your query

Shortcut template

A shortcut template can be installed from the following link:

Install WolframAlphaKit Template

Special mention

A shoutout goes to Mike Beasley whose work on the UpdateKit shortcut inspired me to work on this project.

wolframalphakit's People

Contributors

keveridge avatar kevin-thomas-tigerspike avatar

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.