Sample Content Request with Advanced Formatting

Page 1 of 1 (5 items)
This post has 4 Replies | 2 Followers

Posts 7
Trey Gourley | Forum Activity | Posted: Sat, Mar 27 2010 11:29 PM

I think I am just missing the implementation on customizing the formatting on the header, eachVerse, and footer parameters for your Content call.  http://api.biblia.com/docs/Bible_Content

Would it be possible to get a sample request using the above parameters just to have a starting point?

Thanks,

Trey G.

Posts 408
LogosEmployee
Bryan Smith | Forum Activity | Replied: Tue, Mar 30 2010 8:42 AM

Hi Trey,

Sorry for the delayed response. There was a bug preventing these parameters from working correctly in some situations, which has been resolved now. Here's an example query that sets the header to the full passage reference and version, and formats each verse in it's own paragraph preceded by the verse number:

http://api.biblia.com/v1/bible/content/LEB.html?passage=John3&header=3Cp%3E%5BFullPassageRef%5D%20(%5BVersion%5D)%3C%2Fp%3E&eachVerse=%3Cp%3E%3Csup%3E%5BVerseNum%5D%3C%2Fsup%3E%5BVerseText%5D%3C%2Fp%3E&key=fd37d8f28e95d3be8cb4fbc37e15e18e

Note that the parameters are URI encoded so the forum can display them correctly. Paste it into your browser's address bar to see it decoded.

Posts 7
Trey Gourley | Forum Activity | Replied: Tue, Mar 30 2010 11:16 AM

Hey Brian,

I am still seeing not getting a correctly formatted response.

Here is what I am doing...

1.  header = "", eachVerse = ""

2. Using .Net UrlEncoder method gives me the new request string below...

http://api.biblia.com/v1/bible/content/KJV.html?passage=John 3:1-27&header=%3ch3%3e%5bFullPassageRef%5d+(%5bVersion%5d)%3c%2fh3%3e&eachVerse=%3cp%3e%3csup%3e%5bVerseNum%5d%3c%2fsup%3e%5bVerseText%5d%3c%2fp%3e&footer=&key={MY_SUPER_SECRET_KEY}

3. Submit request.

But the response I am getting is....

<p>&gt;h3&lt;<span lang="en-US">John 3:1&ndash;27</span> (KJV)&gt;/h3&lt;</p><p><span style="vertical-align:super;">1</span></p><p style="text-transform:uppercase; font-size:18pt; direction:ltr; margin-top:0pt; margin-right:0pt; margin-bottom:0pt; margin-left:0pt; text-indent:18pt;" lang="en-US"><span style="text-transform:none; font-size:12pt; direction:ltr;" lang="en-US">There was</span><span style="text-transform:none; font-size:12pt;"> </span><span style="text-transform:none; font-size:12pt; direction:ltr;" lang="en-US">a man</span><span style="text-transform:none; font-size:12pt;"> </span><span style="text-transform:none; font-size:12pt; direction:ltr;" lang="en-US">of</span><span style="text-transform:none; font-size:12pt;"> </span><span style="text-transform:none; font-size:12pt; direction:ltr;"..............

 Maybe I am missing something.

Thanks for your help.

Trey G.

Posts 7
Trey Gourley | Forum Activity | Replied: Sat, May 15 2010 7:39 AM

I am going to bump this up.  I am still having issues with the response for this specific query.

Thanks for any help.

Trey

Posts 1
Joel Erickson | Forum Activity | Replied: Sat, Sep 18 2010 3:24 PM

Trey Gourley:

But the response I am getting is....

<p>&gt;h3&lt;<span lang="en-US">John 3:1&ndash;27</span> (KJV)&gt;/h3&lt;</p><p><span style="vertical-align:super;">1</span></p><p style="text-transform:uppercase; font-size:18pt; direction:ltr; margin-top:0pt; margin-right:0pt; margin-bottom:0pt; margin-left:0pt; text-indent:18pt;" lang="en-US"><span style="text-transform:none; font-size:12pt; direction:ltr;" lang="en-US">There was</span><span style="text-transform:none; font-size:12pt;"> </span><span style="text-transform:none; font-size:12pt; direction:ltr;" lang="en-US">a man</span><span style="text-transform:none; font-size:12pt;"> </span><span style="text-transform:none; font-size:12pt; direction:ltr;" lang="en-US">of</span><span style="text-transform:none; font-size:12pt;"> </span><span style="text-transform:none; font-size:12pt; direction:ltr;"..............

I would prefer having the markup use classes rather than the inline styling, so I can style the results myself. I didn't notice any of the formatting options offering that ability.

Thanks,

Joel

Page 1 of 1 (5 items) | RSS