diff --git a/functions/crypto/Chart.yaml b/functions/crypto/Chart.yaml deleted file mode 100644 index e8f6e19d8..000000000 --- a/functions/crypto/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -description: Get a Crypto currency price -home: https://bitnami.com -keywords: -- cryptocurrency -- crypto -- bitcoin -name: crypto -sources: -- https://github.com/kubeless/functions -version: 0.0.2 diff --git a/functions/crypto/README.md b/functions/crypto/README.md deleted file mode 100644 index 2037b7e51..000000000 --- a/functions/crypto/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Function to get price of Cryptocurrencies - -``` -kubeless function deploy crypto --from-file crypto.py --handler crypto.handler --runtime python2.7 --trigger-http --dependencies requirements.txt -``` - -Then call the function, specifying with crypto currency you want to get the price of: - -``` -kubeless function call crypto --data '{"crypto": "bitcoin"}' -Connecting to function... -Forwarding from 127.0.0.1:30000 -> 8080 -Forwarding from [::1]:30000 -> 8080 -Handling connection for 30000 -10074.8 -``` - - diff --git a/functions/crypto/templates/function.yaml b/functions/crypto/templates/function.yaml deleted file mode 100644 index 21b023727..000000000 --- a/functions/crypto/templates/function.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: kubeless.io/v1beta1 -kind: Function -metadata: - name: crypto - namespace: default -spec: - deps: | - requests - function: | - import requests - import urlparse - - def handler(event): - ticker = event.json['crypto'] - path = urlparse.urljoin('https://api.coinmarketcap.com/v1/ticker/',ticker) - return requests.get(path).json()[0]['price_usd'] - handler: crypto.handler - runtime: python2.7 - type: HTTP