_Blog.getAll(params)

Function to get the list of the blogs of a network.

Example Usage

{% set blog = _Blog.getAll({'type':'blog', 'metaInfo': {'attributeName' : 'attribute value'}}) %}

Parameters

ParameterRequiredDescription
typeno'blog' or 'section'.
titlenoBlog title
descriptionnoBlog description
keywordnoBlog keyword
statusnoBlog status. Possible values are 1(active) and 0(inactive).
userGuidnoGuid of the blog owner
countrynoBlog contact country
statenoBlog contact state
citynoBlog contact city
postcodenoBlog contact poscode
metaInfo['attributeName']noAdditional attributes value

Response Example

[
  {  
   "id":"1",
   "guid":"d2c5396d-7741-4449-9d24-0d33de3sd530",
   "title":"Blog title",
   "shortDescription":"aplle",
   "type":"blog",
   "url":"http://network.cognitives.com.au",
   "featuredColor":"#9c10b3",
   "isDefault":"1",
   "status":"1",
   "userHasBlogAccess":1,
   "isBlogOwner":true,
   "owner":{  
      "id":"18",
      "guid":"22dd6cb6-5611-49ad-bf90-841dab7de24e",
      "name":"Firstname Lastname",
      "username":"username",
      "email":"[email protected]",
      "bio":"Info about user",
      "display_name":"Firstname Lastname",
      "media":{  
         "id":"o328r2ejlbitphpvydv5",
         "cloudName":"cognitives",
         "path":"http://res.cloudinary.com/cognitives/image/upload/v1473074998/o328r2ejlbitphpvyd.jpg"
      }
   },
   "media":{  
      "thumb":{  
         "id":"cxkdrdddbn6ckezkrp41",
         "cloudName":"cognitives",
         "path":"http://res.cloudinary.com/cognitives/image/upload/v1470038651/cxkdrdddbn6ckezkrp.png"
      },
      "cover":{  
         "id":"mdro9ic1iicaq3gxkr4y",
         "cloudName":"cognitives",
         "path":"http://res.cloudinary.com/cognitives/image/upload/v1470894337/mdro9ic1iicaq3gxkr.jpg"
      },
      "structuredMedia":{  
         "url":"http://res.cloudinary.com/cognitives/image/upload/c_fill,dpr_auto,h_60,w_327/cxkdrdddbn6ckezkrp41",
         "height":60,
         "width":327
      }
   },
   "total":{  
      "view":"10",
      "article":"25",
      "followers":"2",
      "following":"0"
   },
   "createdDate":"Dec 01 2016",
   "settings":{  
      "guid":"d2c5396d-7741-4449-9d24-0d33de3sd530",
      "GoogleAnalyticsID":"aaaa-ssss-dddd-ffff-gggg",
      "contact":{  
         "email":"[email protected]",
         "name": "test",
         "phone":"1234567890",
         "address": "address",
         "country":"Australia",
         "state": "Melbourne",
         "city":"sydney",
         "postcode": "11111",
      },
      "location":{  
         "latitude":"",
         "longitude":"",
         "googlePlaceId":""
      },
      "social":{  
         "facebook":"http://facebook.com",
         "twitter":"http://twitter.com",
         "google":"http://google.com",
         "linkedin":"http://linkedin.com",
         "youtube":"http://youtube.com",
         "vimeo":"http://vimeo.com",
         "pinterest":"http://pinterest.com",
         "website":"http://test.com"
      }
   },
   "additionalInfo": {
      "addtional_description": "05-07-2017 12:00 AM",
      "hobbies": "reading_books",
      "fav_actor": "tom_cruise,liz_hurley",
      "mother_tongue": "english",
      "big_description": "admin blog description",
      "media": "https://cog-development.s3-ap-southeast-2.amazonaws.com/media/10/2017/Jul/26/L5Gn5aBzKEAdAwe2WeDf.jpg"
    }
	}
]

Response Description

Returns an array of blogs with following attributes.

AttributeDescription
idID of the blog
guidGUID of the blog
titleTitle of the blog
shortDescriptionShort description of the blog
typeblog or channel
urlAbsolute URL of the blog
featuredColorFeatured color of the blog
isDefaultWhether the blog is default
statusBlog status. 1 - active, 0 - inactive
userHasBlogAccessWhether the logged in user has blog access
isBlogOwnerWhether the logged in user is blog owner
ownerBlog owner details
mediaImages of the blog.
totalBlog stats
createdDateBlog created date
settingsBlog settings
blogHeaderMenuHeader Menu of blog
blogFooterMenuFooter Menu of blog
additionalInfoAn array of additional attributes. Array key is the name of the attribute and value is the value of the attribute.

Owner details

AttributeDescription
idUser ID
guidUser GUID
nameName of the user
usernameUsername
emailUser email
bioUser bio
display_nameUser display name
mediaUser media

Media

AttributeDescription
thumb Thumb media details
coverCover media details

Media Details

AttributeDescription
idCloudinary ID of the image
cloudNameCloudinary Cloud name
pathCloudinary path of the image

Blog stats

AttributeDescription
viewBlog views
articleBlog articles
followersBlog followers
followingBlog followings

Blog Settings

AttributeDescription
guidBlog GUID
GoogleAnalyticsIDGoogle analytics ID
contactContact details
locationLocation details
socialBlog social details

Contact Details

AttributeDescription
emailContact email

Location Details

AttributeDescription
latitudeLatitude
longitudeLongitude
googlePlaceIdGoogle Place Id

Blog Social Details

AttributeDescription
facebookFacebook link
twitterTwitter link
googleGoogle link
linkedinLinkedIn link

Menu Details

AttributeDescription
idMenu ID
guidMenu GUID
blog_idBlog ID
labelMenu title
menu_typeMenu type i.e. header or footer
typeMenu item type i.e. blog or page or section
blogGuidBlog GUID
blogTitleBlog title
pageGuidPage GUID
pageTitlePage title
linkMenu item link
childrenSub menu items. Same attributes as menu except children.