-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor updates to oauth infra and spotify, github items
- Loading branch information
1 parent
7d6c428
commit dc017b1
Showing
16 changed files
with
160 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// eslint-disable-next-line | ||
const { getDefaultConfig } = require('expo/metro-config'); | ||
|
||
/** @type {import('expo/metro-config').MetroConfig} */ | ||
const config = getDefaultConfig(__dirname); | ||
|
||
module.exports = { | ||
...config, | ||
resolver: { | ||
...config.resolver, | ||
extraNodeModules: { | ||
...config.resolver.extraNodeModules, | ||
stream: require.resolve('react-native-stream'), | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { | ||
InventoryIntegration, | ||
DjinnStat, | ||
SpiritStat, | ||
CommunityStat, | ||
IntelligenceStat, | ||
InventoryItem, | ||
HoF, | ||
} from 'types/GameMechanics'; | ||
|
||
const equip: HoF = async (promptAsync) => { | ||
console.log('equipping github!!!'); | ||
try { | ||
// expo-auth-session only exposes API via hooks which we cant embed in this since its a conditional call | ||
// should we roll our own OAuth lib or just keep this callback method? | ||
// Slightly complicates equip() vs no params but also enables a ton of functionality for any item | ||
promptAsync!(); | ||
// TODO send mu(syncProvideId). If call fails then login unsuccessful | ||
return true; | ||
} catch (e) { | ||
console.log('Inv:github:equip:ERR', e); | ||
return false; | ||
} | ||
}; | ||
|
||
const unequip: HoF = async () => { | ||
console.log('unequip github!!!'); | ||
try { | ||
// TODO call api to delete identity | ||
return true; | ||
} catch (e) { | ||
console.log('Inv:github:equip:ERR', e); | ||
return false; | ||
} | ||
}; | ||
|
||
const item: InventoryItem = { | ||
id: 'Github', | ||
name: 'Octopus Brains', | ||
datasource: 'Github', | ||
image: 'https://pngimg.com/uploads/github/github_PNG90.png', | ||
tags: ['digital', 'productivity'], | ||
attributes: [ | ||
{ ...DjinnStat, value: 1 }, | ||
{ ...CommunityStat, value: 5 }, | ||
{ ...SpiritStat, value: 5 }, | ||
{ ...IntelligenceStat, value: 20 }, | ||
], | ||
checkStatus: async () => { | ||
// TODO api request to see if access_token exist on API | ||
return 'unequipped'; | ||
}, | ||
canEquip: async () => true, | ||
equip, | ||
unequip, | ||
abilities: [], | ||
widgets: [], | ||
}; | ||
|
||
const initPermissions = async () => { | ||
return true; | ||
}; | ||
const getPermissions = async () => { | ||
return true; | ||
}; | ||
|
||
export default { | ||
item, | ||
checkEligibility: async () => true, | ||
equip, | ||
unequip, | ||
getPermissions, | ||
initPermissions, | ||
} as InventoryIntegration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.