Difference between revisions of "Component: BBC News (Comms: IoT/Cloud)"

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_BBCNews.fcfx FC_Comp_Source_BBCNews.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/BBCNews.fcfx FC_Comp_Source_temp/BBCNews.fcfx]
  
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_BBCNews.fcfx FC_Comp_Source_BBCNews.fcfx]
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/BBCNews.fcfx FC_Comp_Source_temp/BBCNews.fcfx]
  
 
==Detailed description==
 
==Detailed description==
Line 77: Line 77:
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
 +
 +
  
  
Line 85: Line 87:
 
==Macro reference==
 
==Macro reference==
  
===GetURL===
+
===GetDescription===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetURL'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDescription'''
 
|-
 
|-
| colspan="2" | Get Selected News Item URL&nbsp;
+
| colspan="2" | Get Selected News Item Description&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 99: Line 101:
  
  
===RequestData===
+
===GetTitle===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RequestData'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTitle'''
 
|-
 
|-
| colspan="2" | Requests data about your selected location from the BBC news service. Returns the number of headlines if the request was successful. Must be called before trying to call any of the GetXXX macros.&nbsp;
+
| colspan="2" | Get Selected News Item Title&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | ItemNumber
 
|-
 
| colspan="2" | Headline Index To Read&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===GetTitle===
+
===GetURL===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTitle'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetURL'''
 
|-
 
|-
| colspan="2" | Get Selected News Item Title&nbsp;
+
| colspan="2" | Get Selected News Item URL&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 132: Line 129:
  
  
===GetDescription===
+
===Initialise===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDescription'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | Get Selected News Item Description&nbsp;
+
| colspan="2" | Sets up the component ready to collect news data.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===Initialise===
+
===RequestData===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RequestData'''
 +
|-
 +
| colspan="2" | Requests data about your selected location from the BBC news service. Returns the number of headlines if the request was successful. Must be called before trying to call any of the GetXXX macros.&nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | Sets up the component ready to collect news data.&nbsp;
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ItemNumber
 
|-
 
|-
 +
| colspan="2" | Headline Index To Read&nbsp;
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}

Revision as of 11:59, 3 February 2023

Author MatrixTSL
Version 1.0
Category Comms: IoT/Cloud


BBC News component

Easily allows you to collect the news headlines and stories from the BBC RSS feed.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_temp/BBCNews.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_temp/BBCNews.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples





Macro reference

GetDescription

Fc9-comp-macro.png GetDescription
Get Selected News Item Description 
Fc9-string-icon.png - STRING Return


GetTitle

Fc9-comp-macro.png GetTitle
Get Selected News Item Title 
Fc9-string-icon.png - STRING Return


GetURL

Fc9-comp-macro.png GetURL
Get Selected News Item URL 
Fc9-string-icon.png - STRING Return


Initialise

Fc9-comp-macro.png Initialise
Sets up the component ready to collect news data. 
Fc9-void-icon.png - VOID Return


RequestData

Fc9-comp-macro.png RequestData
Requests data about your selected location from the BBC news service. Returns the number of headlines if the request was successful. Must be called before trying to call any of the GetXXX macros. 
Fc9-u16-icon.png - UINT ItemNumber
Headline Index To Read 
Fc9-u16-icon.png - UINT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png LinkTo
 
Fc9-type-10-icon.png BBC IP Address
IP Address linked to the following URL: weather-broker-cdn.api.bbci.co.uk 
Fc9-type-16-icon.png News Feed
 
Fc9-type-10-icon.png Feed URL
 
Fc9-type-21-icon.png Receive Timeout
Maximum time to wait for valid incoming data. 
Fc9-conn-icon.png Data
Fc9-type-7-icon.png Record Title
Stores the news topic title into RAM. 
Fc9-type-21-icon.png Title Buffer Size
Number of bytes to allocate to storing titles. 
Fc9-type-7-icon.png Record Description
Stores the news topic description into RAM. 
Fc9-type-7-icon.png Record URL
Records the news topics full story URL into RAM