Skip to content

Instantly share code, notes, and snippets.

@coolaj86
Created March 25, 2015 06:14
Show Gist options
  • Save coolaj86/65fc2d176e4303c7ad53 to your computer and use it in GitHub Desktop.
Save coolaj86/65fc2d176e4303c7ad53 to your computer and use it in GitHub Desktop.
A clone of http://tech.lds.org/wiki/LDS_Tools_Web_Services just in case it ever gets taken down
The LDS Tools Web Services provide common services for LDS Tools applications.
Contents [hide]
1 Web service location
2 Description of Services
2.1 Signin services
3 Configurable Values
3.1 References
Web service location
Because the URLs may change for the web services, a JSON file has been placed on the tech.lds.org server that points to the current location of the web services. It's useful to have these URLs external like this so that developers will not be required to update their apps when they change, which is expected to happen in the July timeframe.
https://tech.lds.org/mobile/ldstools/config.json
This file should look something like this:
{
"maintenance-android":"false",
"maintenance-ios":"false",
"auto-update-days":"17.25",
"connect-timeout-seconds":"30",
"timeout-seconds":"60",
"response-timeout-seconds":"30,60,90",
"retry-delay-ms":"500,4000,10000",
"expire-after-num-days":"60",
"num_warnings_after_expired":"3",
"auth-url":"https://signin.lds.org/login.html",
"signout-url":"http://www.lds.org/signinout/?lang=eng&signmeout",
"leader-access":"http://tech.lds.org/mobile/ldstools/leader-access-1.0.json",
"directory-status":"https://www.lds.org/mobiledirectory/heartbeat",
"cal2x-status":"https://www.lds.org/mobilecalendar/heartbeat",
"current-user-id":"https://www.lds.org/mobiledirectory/services/ludrs/mem/mobile/current-user-id",
"current-user-unit":"https://www.lds.org/mobiledirectory/services/ludrs/mem/mobile/current-user-unitNo",
"current-user-units":"https://www.lds.org/mobiledirectory/services/ludrs/unit/current-user-units",
"member-assignments":"https://www.lds.org/mobiledirectory/services/ludrs/mem/mobile/member-assignments",
"unit-members-and-callings":"https://www.lds.org/mobiledirectory/services/ludrs/mem/mobile/member-detaillist-with-callings/%@",
"cal2x-init":"https://www.lds.org/mobilecalendar/services/lucrs/mem/currentUserOptions/%@",
"cal2x-colors":"https://www.lds.org/mobilecalendar/services/lucrs/cal/allColors",
"cal2x-events":"https://www.lds.org/mobilecalendar/services/lucrs/evt/calendar/%.0f-%.0f",
"cal2x-subscribed":"https://www.lds.org/mobilecalendar/services/lucrs/cal/subscribed",
"cal2x-event":"https://www.lds.org/mobilecalendar/services/lucrs/evt/%d",
"cal2x-locations":"https://www.lds.org/mobilecalendar/services/lucrs/loc/locations",
"cal2x-set-calendar-color":"https://www.lds.org/mobilecalendar/services/lucrs/cal/%@/color/%@/",
"photo-url":"https://www.lds.org/mobiledirectory/services/ludrs/photo/url/%@/%@",
"photo-base-url":"https://www.lds.org",
"largePhoto":"{500,375};original.jpg;enabled",
"mediumPhoto":"{200,150};medium.jpg;enabled",
"thumbnailPhoto":"{40,40};thumbnail.jpg;enabled",
"photo-upload-path":"/mobiledirectory/services/ludrs/photo/upload/%@/%@/%d/%d/%d",
"photo-delete-path":"/mobiledirectory/services/ludrs/photo/delete-photo-ml/%@/",
"photo-upload-content-type":"application/octet-stream",
"leader-reports-enabled":"true",
"birthday-list":"https://www.lds.org/mls/mbr/services/report/birthday-list/unit/%@/?month=1&months=12&organization=selectAll&lang=eng",
"action-and-interview-list-full":"https://www.lds.org/mls/mbr/services/report/action-interview-list/full/unit/%@/?lang=eng",
"temple-recommend-status":"https://www.lds.org/mls/mbr/services/recommend/endowed-members?unitNumber=%@&lang=eng",
"callings-with-dates":"https://www.lds.org/mls/mbr/services/report/members-with-callings?unitNumber=%@&lang=eng",
"unit-statistics":"https://www.lds.org/mls/mbr/services/report/unit-statistics?unitNumber=%@&lang=eng",
"organization-list-url":"http://tech.lds.org/mobile/ldstools/lists.json",
"ios-eng-support-rss-url":"http://www.ldsmobile.org/lt-ios-help/?feed=rss2",
"members-moved-in":"https://www.lds.org/mls/mbr/services/report/members-moved-in/unit/%@/%d?lang=eng",
"membership-records":"https://www.lds.org/mls/mbr/services/report/membership-records?unitNumber=%@&lang=eng",
"feedback":"https://lds.qualtrics.com/SE/?SID=SV_esOCWpQ67JUc6na",
"android-faq-url":"http://www.lds.org/callings/melchizedek-priesthood/records-and-technology-support/lds-tools-faq?lang=eng",
"android-release-notes-url":"https://www.lds.org/callings/melchizedek-priesthood/records-and-technology-support/lds-tools-release-notifications?lang=eng#android",
"ios-faq-url":"http://www.lds.org/callings/melchizedek-priesthood/records-and-technology-support/lds-tools-faq?lang=eng",
"ios-release-notes-url":"https://www.lds.org/callings/melchizedek-priesthood/records-and-technology-support/lds-tools-release-notifications?lang=eng#ios"
}
Description of Services
All of the web services below return data in a JSON format.
Signin services
auth-url https://signin.lds.org/login.html
type:HTTP POST parameters: "username" and "password" and a redirect URL in the cookie
This is the URL you will use to authenticate the user. If the authentication was successful, you should get a 200 response code and the phrase "Sign In" shouldn't be found in the response body. Use an HTTP POST for this request.
signout-url http://www.lds.org/signinout/?lang=eng&signmeout
type:GET parameters: none
This is useful to call when signing out as one user and before signing in as another.
current-user-unit
Once the user has authenticated, the SSO server will append a session cookie to your request, so you don't have to do anything special to let the web service know that you're authenticated. This request will return the unit number of the ward the authenticated user is assigned to. Use an HTTP GET for this request.
stake-units
This will return a list of ward unit numbers for the stake the authenticated user is in. Use an HTTP GET for this request.
stake-leadership
This will return all the leaders for the stake. Use an HTTP GET for this request.
unit-membership
Returns all the members and families within the ward. You will need to loop through the unit numbers you get from the "stake-units" service and make this call for each ward in the stake. Replace the '%@' with the unit number. Use an HTTP GET for this request.
unit-leadership
Returns all the leadership positions and the individual who is assigned to that position. Again, replace the '%@" with the ward unit number. Use an HTTP GET for this request.
photo-url
Returns a JSON file with temporary uris to a small medium and large image. The image will be returned as a jpeg.
The format for the photo-url is:
https://lds.org/directory/services/ludrs/photo/url/[head of house id]/household
https://lds.org/directory/services/ludrs/photo/url/[comma separated list of individual ids]/individual
cal-subscribed
Returns a list of the calendars the authenticated user is subscribed to. Use an HTTP GET for this request.
cal-events
Returns all the events for the calendars the authenticated user is subscribed to within the range you specify. Replace the "%.0f-%.0f" with the start and end ([start]-[end]) (in milliseconds since 1970). Use an HTTP GET for this request.
cal-version
It is uncertain why this one is included; it is probably not used anywhere. Use an HTTP GET for this request.
cal-event
Retrieve details for a specific event. Replace the '%d' with the event id you got from the "cal-events" service. Use this when the user selects a specific event in order to pull that event up in its own page. Use an HTTP GET for this request.
Configurable Values
maintenance-android and maintenance-ios
informs apps to not process a sync due to system maintenance
auto-update-days
indicates how often the apps will perform an automatic update. CURRENTLY DISABLED
connect-timeout-seconds, timeout-seconds and response-timeout-seconds
indicate the amount of time the apps will wait during different processes
retry-delay-ms
a progressive array of times that are used to increase our retry delay when service calls start failing
expire-after-num-days
time after which we force a data sync
num_warnings_after_expired
number of warnings user is given before being locked out of the data and forcing a clear
References
Data for the LDS Tools application is retrieved from the Church via web services. There are two categories of services.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment