From 7d81c8fb79400b8f326ff5744f5417a9a78f7d8a Mon Sep 17 00:00:00 2001 From: Cecep Aprilianto Date: Tue, 24 Jul 2018 00:36:29 +0700 Subject: [PATCH] first setup: Medium library --- .babelrc | 8 ++++ .gitignore | 3 ++ .watchmanconfig | 1 + App.js | 37 ++++++++++++++++++ app.json | 27 +++++++++++++ assets/icon.png | Bin 0 -> 2976 bytes assets/splash.png | Bin 0 -> 7178 bytes package.json | 10 +++++ src/Medium.js | 95 ++++++++++++++++++++++++++++++++++++++++++++++ src/index.js | 11 ++++++ 10 files changed, 192 insertions(+) create mode 100644 .babelrc create mode 100644 .gitignore create mode 100644 .watchmanconfig create mode 100644 App.js create mode 100644 app.json create mode 100644 assets/icon.png create mode 100644 assets/splash.png create mode 100644 package.json create mode 100644 src/Medium.js create mode 100644 src/index.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..2bcd546 --- /dev/null +++ b/.babelrc @@ -0,0 +1,8 @@ +{ + "presets": ["babel-preset-expo"], + "env": { + "development": { + "plugins": ["transform-react-jsx-source"] + } + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f9e17e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/**/* +.expo/* +npm-debug.* diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/App.js b/App.js new file mode 100644 index 0000000..ab66c7c --- /dev/null +++ b/App.js @@ -0,0 +1,37 @@ +import React from 'react'; +import { StyleSheet, Text, View, Button } from 'react-native'; + +import { Medium } from "./src"; + +export default class App extends React.Component { + + handlePress = async () => { + const result = await Medium.logInAsync({ + 'client_id': '70eaa8fd5369', + 'scope': Medium.getScopes(), + 'state': 'my arbitary state' + }) + + console.log(result); + } + + render() { + return ( + +