How to retrieve a list of spiritual gifts

Today’s tutorial launches a LONG series over the next couple of weeks.

This series was to have started last week, but apparently I thought this year was 2018 when I set the publish date. Oops… 🙂

Nevertheless, I figured out and corrected the error in my ways, arriving back from the future, and now you’re able to enjoy and read this tutorial at this very moment. 😀

On forward we go with today’s spiritual gifts tutorial…

There’s been much talk about how to spiritually assess individuals and match persons to ministries based on a wide ranging list of passions, giftings, habits and life experiences.

Hot button topics like how to truly qualify whether or not someone has the gift of prophecy or called to teach the Word of God from the main stage on Sunday mornings can’t be left up for opinion or wonder.

After all, it’s more than a person simply being fulfilled in having a opportunity haphazardly flaunting a gift that could harm the general public, right?

And this is where spiritual gifts assessment tools enter to save the day along with much prayer and seeking God for discernment, revelation and wisdom.

From paid services like MinistryVitals.com to SpiritualAssessment.com, there are a multitude of tools for evaluating a person’s spiritual giftings.

Although these tools are a good start, it can be quite expensive for a growing church to commit resources for paid spiritual gift assessments without a vision, mission and strategy for how such information will be used.

As it pertains to CCB and spiritual gifts, today’s tutorial will take you step-by-step, showing how to use the Lookup Table Services to access a list of gifts that are shown on an individual’s CCB profile under the MyFit section.

In the coming weeks, we’ll add to this tutorial on your way to having a fully functional spiritual gifts assessment tool, both standalone and fully integrated CCB versions.

Like I said, it’ll take us a few weeks to work through the details, but hang in there because it’ll be well worth the wait. 😉

Setting Up API Service

Crack open the text editor of your choice and let’s get started with the necessary include files and comments.

Next, define the apiService variable, setting it equal to the gift_list API Lookup Table Service (shown below).

Time to Make the CCB API Call

To successfully make a CCB API call, simply define the urlData variable. This variable consists of binded API service call data, and is binding via an array as follows:

  • Bind the srv label to apiService variable

Next, define the rss variable equal to the ccbDetails function, passing get as the first argument and the urlData variable as the second argument.

Ready to Parse the CCB XML Response?

Moving right along, define a nodes variable and set it equal to the rss variable pointed to use the built-in XPATH query function with the following expression: //items/item.

The XPATH query function and expression allows for identifying, capturing, and parsing each CCB spiritual gift that is made available for viewing.

Time to Parse and Display Spiritual Gifts

Last but not least, define an empty response_object variable. We’ll use the response_object variable to concatenate a list of spiritual gifts to be displayed via the web browser.

To capture each spiritual gift parsing the CCB XML response, simply use a foreach statement to traverse or iterate via the nodes variable.

Within the foreach statement, use the response_object variable and set it to use the .= operator to concatenate a single line entry for both the name (i.e., $node->name) and id (i.e., $node->id) of the spiritual gift.

Finally, the very last step is to simply echo the response_object variable for viewing via the web browser.

I Love It When a Plan Comes Together

I’ve been watching too much A-Team lately (just dated myself too!). 😀

Nevertheless, it’s time to piece your code together to look like the code below.

Save your code to a php file and open it via a web browser, you’re on your way to viewing a list of CCB spiritual gifts.

Next week’s tutorial, I’ll show you how to create a custom excel spreadsheet that contains spiritual assessment questions with their respective spiritual gift categorization.

Let me know if you need help or have additional questions. Drop me a comment or question below. See you next week! 😉

 


Please comment if this tutorial has helped you.