Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partner Sites? #163

Open
alexshepard opened this issue Dec 12, 2018 · 3 comments
Open

Partner Sites? #163

alexshepard opened this issue Dec 12, 2018 · 3 comments

Comments

@alexshepard
Copy link

It would be cool the mobile apps could use the API to lookup what partner sites were available for users, rather than having to embed that data into the app, forcing an app release every time a new partner comes online or changes branding.

Partner sites would need the at least the following fields:

  • short name (iNaturalist NZ)
  • name (iNautralist NZ - Mātaki Taiao)
  • base url
  • icons (supporting multiple resolutions for Retina displays)
  • siteid
  • country name
  • mobile country codes

I think Android also sets the default bounding box for the Explore tab based on the chosen partner, so some geo information may also be needed.

@kueda
Copy link
Member

kueda commented Jul 17, 2020

https://api.inaturalist.org/v1/sites gets us most of the way there. It's missing

  • logo_url
  • logo_square_url
  • place object that includes the name of the place ("country name" Alex requested above) and a bounding box
  • bounding box in geo_swlat, geo_swlng, geo_nelat, geo_nelng

@alexshepard what are "mobile country codes"? Do you mean the language code in locale?

@viatrix
Copy link
Contributor

viatrix commented Aug 2, 2020

There are also mobile country codes (https://en.wikipedia.org/wiki/Mobile_country_code) and country calling codes (https://en.wikipedia.org/wiki/List_of_country_calling_codes). Maybe one of them is meant by mobile country code?

@alexshepard
Copy link
Author

@viatrix is correct, the first link. Here's the PDF reference I use:
https://www.itu.int/dms_pub/itu-t/opb/sp/T-SP-E.212A-2012-PDF-E.pdf

On iOS we can query the CoreTelephony API to learn what carrier a user's SIM card is attached to. That carrier contains a reference to the mobile country code of origin for the carrier, which is the ITU mobile country code.
https://developer.apple.com/documentation/coretelephony/ctcarrier/1620309-mobilecountrycode

In this way, we can detect the most likely "home" country for a user, even if they are traveling or on holiday, and present them with the most appropriate partner prompt when logging in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants