// @flow

const root = 'https://stolaf.api.frogpond.tech/v1'
export const API = pth => {
	if (process.env.NODE_ENV !== 'production') {
		if (!pth.startsWith('/')) {
			throw new Error('invalid path requested from the api!')
		}
	}
	return root + pth
}

export const GH_NEW_ISSUE_URL =
	'https://github.com/StoDevX/AAO-React-Native/issues/new'

@@ -3,16 +3,46 @@
  @flow%0A%0A
+import qs from 'querystring'%0A%0A
 const ro
@@ -103,19 +103,50 @@
 t API = 
+(
 pth
+: string, query: ?Object=null)
  =%3E %7B%0A%09i
@@ -290,14 +290,17 @@
 %09%7D%0A%09
-r
+l
 et
+ 
 ur
-n
+l =
  roo
@@ -306,16 +306,81 @@
 ot + pth
+ %0A%09if (query) %7B%0A%09%09url += %60?$%7Bqs.stringify(query)%7D%60%0A%09%7D%0A%09return url
 %0A%7D%0A%0Aexpo

support query strings to the api server