Afficher des vidéos de YouTube avec YQL

Pour lister des vidéos de Youtube on utilise la boucle DATA de SPIP 3 ainsi qu’une recherche sur Youtube via YQL

Le code

  1. <B_youtube>
  2.   <ul class="thumbnails">
  3.     <BOUCLE_youtube(DATA)
  4.      {source yql, "select * from youtube.search(50) where query='spip'"}
  5.      {datapath query/results/video}
  6.      {pagination 9}>
  7.       <li class="span2">
  8.         <a class="thumbnail" style="height:200px" href="#URL">
  9.           <img src="#VALEUR{thumbnails/thumbnail/0/content}" />
  10.           <h3>#VALEUR{title}</h3>
  11.         </a>
  12.       </li>
  13.     </BOUCLE_youtube>
  14.   </ul>
  15.   [<div class='pagination'>(#PAGINATION{page})</div>]
  16. </B_youtube>

Télécharger

Le résultat

Aucun résultat

Et voilà le travail !

CKAN API

CKAN est un outil de gestion/publication d’entrepôt OpenData assez largement utilisé. Il propose une API REST qui permet d’interroger l’entrepôt pour rechercher, lister et récupérer des jeux de données, le tout au format JSON.

L’interrogation de cette API se fait donc simplement à travers la méthode JSON.

Un exemple tiré de la documentation de l’API CKAN.

Le code

  1. <dl>
  2.     <BOUCLE_ckan(DATA)
  3.          {source json, http://demo.ckan.org/api/3/action/group_list?id=data_explorer}>
  4.     <dt>#CLE</dt>
  5.     <dd>[(#VALEUR|print)]</dt>
  6.     </BOUCLE_ckan>
  7. </dl>

Télécharger

Le résultat

help
https://demo.ckan.org/api/3/action/help_show?name=group_list
success
1
result
123, 1234, 16848646846, 1qaz, 20171211, 20171220, 2017test-source, 20-pp-pleated-water-filter-cartridge-manufacturers, 24601, 4354, aaaa, aafcgroup, adokontax, agr, agricoltura-pesca-silvicoltura-e-prodotti-alimentari, agricultura, a-groupe, agrsrv, air-cylinder-piston-rod, aire, alukepelizzgroup, ambientedel-aire, amtw, antoub-group, arthormore, asassa, ashdbashashash, atest-group, aubanellp1, balagroup2, balagrp1, balagrp2, balagrp3, bangaloregroupo, bases-xxx, batch_load_pdf_collection_with_compound_item_test-2, batch_load_test_collection, bba50, boric-acid-derivative-suppliers, brian-s-first-group, bulk-memory-foam-pillow-supplier, bundeahaushalt, buy-teflon-gland-packing, calildadaire, categoria-cf-2018, cb_testgroup, cec-bio, cheap-children-face-mask-with-valve, china-6pcs-bee-eye-light-factory, china-automated-storage-and-retrieval-system-manufacturers, china-forklift-drum-clamps-manufacturers, china-jade-bracelet-factory, china-matting-agents-manufacturers, china-wireless-in-ear-headphones-suppliers, china-wolf-hound-board-game-suppliers, ciencia, ciencias-y-tecnologia, ciencia-y-tecnologia, ciencia-y-tecnologia-simpsom, ckan-datos-test, ckanr_test_group, ckan-test-group, clarity-h2020-eu, cloudwick1, clutch-bearing, cog-gis, comarch-healthcae, compgp, contactosrub, country-data, cultura, cultura-ocio, cultura-y-ocio, curators, curso-munis, dados-externos, dads, dasdsa, data360, data-bulan-april, data-bulan-maret, data-explorer, datos-del-sepe, demodemodemodemo, demografia, demo-group, demonstracao, demor, deporte, dfdfd, dgti, disciplina-de-dados-abertos, doradexplorer, drinux, economia, economia-agricola, economics, economie, educa, educacion, efer, electronicappliances, eliya, emails, energia, enrollment, exper-group, farm-cultivaotr-quotation, fchargroup, fctest, fdfd, finance, fineprint, flower_photographs, fluoranthene, fng, foam-tape-price, fons-municipal-catalegs-de-les-series-d-urbanisme, fons-particulars, formazione, friskvard, fwefwew, g10, gabelas, ganaderia, gasdgadfgbdf, gasdgadfgbdfvsdsdsm, geo-examples, gestaocomdadosabertos_amtw, gestaocomdadosabertos_esquipegp, gestaocomdadosabertos_marketing, get-your-love-back-by-astrology, gewoiwopie, gfdsfdsfs, ghahso, glue_one_group, google-flights, gouli-ckan, governance, gr01, _gr01, gravity-blanket, group1, group-1, group11, group17, group-23, group-da-fema, groupetto, group-joeey, group_nak, group-of-datasets-with-no-orgs, group-one, group-test-22-06-2017, grpmartini, grup, grup2, grup3, grupa-1, grupa-2, grupa-3, grupaabbcc, grupo1, grupo-anton, grupobartsimpsom, grupodeprueba, grupo_dir, grupoinnovacion2018, grupo-l, grupolisasimpsom, grupo-odr, grupoprueba, grupo-pruebita, grupo-wadus, gruppo-di-esempio, gruppo-di-portale, gruppo-di-prova, gruppo-di-prova-nadia, gruppo-nadia, gs-lab-group, guppo-aidan, hacienda, haha123, harvesterdemo, hawaii, hcl-lab, health_outcomes_and_behavior, healthworkinggroup, hidden_collection, high-quality-s-injector-nozzle, hjk, hoge_group2, hoge_group3, honggroup, honggroup1, hot-sale-wire-harness, housing, hr-group, iben, idom_test, iepr-datos-test, industri-listrik-dan-air-minum, infoassetgroup, informatica, innovacion, instruments, interesting, ioppopojkl, ipsos, ipsos-public-affairs, jacienda, jamproject001, jamproject123456, jane-org-test-group, jcta-data-e, jd-group, jeju-library-management, journal-of-classical-studies, jtuuser, juliangroup, kanaggroup, kategorija, kgroup-1, kominfo, kompjuteri, listas, logstraffic, los-datos-de-elena, love-marriage-specialist-baba-ji-delhi, luclipse1, luclipse2, lwo-group, macplan_datos, mahmoudgroup1, mamandurrias, m_ambiente, manning_collection, master, matsudah2, mazinger-z, medioambiente, medio_ambiente, medio-ambiente, metadatagrouptest1, metadatagrouptest2, meteotestgroup, meubelair, meu-grupo, michaelbeilin_test, micro-pm-motor-suppliers, mi-grupo, misc_images, missouri_southern_university, mundo3, munihojancha, mybi, my-company, mydata1, myfirstgroup, my-g, my-gfriend, mygroup, my-group, my_group_1, my-open-data-group, my-testgroup, my-test-group, mzk_my, newgroup, new-group-demo, new-york, nextalert, novo-grupo, nrs, oca, oea-datos-abiertos, oictgroup, opendata, opendatacr2018, open-data-oea-cr, open-source, open-sourcet, oscar-do-ano-2000, osprey-ce13-manufacturers, otrosdatos, parana, passa, paulo, photographs, pictures_of_zada, popolazione, popolazione-delia, populate-grupo-a, pressupostos, product1, project1, prueba15junio, prueba15junio2, pruebare15, pruebasdegrupos, ptfe-cloth, publications, puppies, purplecheeseadventure, qwerty, rabatadmin, rayen, rayen3, reader, realidad-aumentada, realidad-virtual, reference-data-population, regiones, repo, rerer, research-project-1, rettoc, revenue, rgr_musica, rigid-cardboard-box-china, rolling-door-panel-production-line, rub, rutas-y-caminos, sadasdsadasd, sadfasf-wwr2r2sdfasdfas, saipa3232, sales, schwendermarkt, secret, serpro, shenzhen-sunsoar-tech-co-ltd, sincis, sociale, solid-beige-color-artificial-marble-factory, soratjalasa-m, soratjalasat, sparx, staff, suagm_vpaei_datostest, suagm_vpaei_datos_test, sumithra_group, summer_insitute_training_manuals, syn-odi-catalog, syslogic-ckan-demo, takodah_photographs, taxation, tec, tech, test, test1, test1234, test5476, test_aagii, test_audat, test-chong-1, test-ckan2, testd, test-desu-yo, teste2, testee, testegabriel, teste-organizacaoif, tester, testest, test-gr, testgroup, test_group, test-group, testgroup1, test-group-1, testgroup100, test-group111111, testgroup2, test-group22332, testgroupkampod, test-group-prasad, testgroups, test-groups17, test-grup, testie, test_import_g, testing-group, test-mctest, testorg12345, test-organisationn-group, test-terry, testtest, test-test, tg001, title-demo, toancauxanh1, toebehoren, tokyo__, tokyo_test1023, top-level_collection, toukei, toukei2, trans, transport_verkehr, ttttttttttt, turismo, turismo-master-bd, turkey, tw-group, tw-group-2, tw-group3, ugogroup, ugogroup1, ungruppo, universitats, untitled, user-group-xyz123, userjtu, valeska-guedes-e-michele-dantas, vatestfgrouac, very-special-group, video-card-factory, wahoo, water-for-injection-equipment-manufacturers-china, wayne, website_html, wise, wise-1, wt_test, wt_test-test, yoga-roller, yulon_aa, yuyu, yyyy, zackgroup

Dans un second exemple, on fait une recherche de jeux de données sur un mot clé "spending" :

Le code

  1. <dl>
  2.     <BOUCLE_ckan(DATA)
  3.          {source json, http://demo.ckan.org/api/3/action/package_search?q=spending}>
  4.     <dt>#CLE</dt>
  5.     <dd>[(#VALEUR|print)]</dt>
  6.     </BOUCLE_ckan>
  7. </dl>

Télécharger

Le résultat

help
https://demo.ckan.org/api/3/action/help_show?name=package_search
success
1
result

count: 4
sort: score desc, metadata_modified desc
facets:
results:
 0:
  license_title: Creative Commons Attribution
  maintainer:
  relationships_as_object:
  private:
  maintainer_email:
  num_tags: 3
  id: b9076e40-80ea-480b-b330-e399d7a8c09b
  metadata_created: 2017-07-18T13:16:32.128034
  metadata_modified: 2018-03-06T09:44:16.113441
  author:
  author_email:
  state: active
  version:
  creator_user_id: bbe1265b-8ff1-4b39-a857-fc2e9eed2057
  type: dataset
  resources:
   0:
    mimetype: text/csv
    cache_url:
    hash: f4f94ec6f3297e608a562434e52a3993a3c3f7e4
    description: December 2011
    name: December 2011
    format: CSV
    url: http://www.newcastle.gov.uk/sites/drupalncc.newcastle.gov.uk/files/wwwfileroot/your-council/local_transparency/december_2011.csv
    datastore_active: 1
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2017-07-18T13:16:32.204680
    state: active
    mimetype_inner:
    last_modified: 2012-03-13T22:04:31.993982
    position: 0
    revision_id: 746c4bc2-7666-4519-a008-13ed98161b03
    url_type:
    id: 0c2bd47a-6ac5-412e-a337-1b45a952e07e
    resource_type: file
    size: 1081957
   1:
    mimetype:
    cache_url:
    hash:
    description: November 2011
    name: November 2011
    format: CSV
    url: http://www.newcastle.gov.uk/sites/drupalncc.newcastle.gov.uk/files/wwwfileroot/your-council/local_transparency/november_2011.csv
    datastore_active: 1
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2017-07-18T13:16:32.204696
    state: active
    mimetype_inner:
    last_modified:
    position: 1
    revision_id: 746c4bc2-7666-4519-a008-13ed98161b03
    url_type:
    id: 52a0c92e-99a3-427d-93a6-73ef5cdccc11
    resource_type: file
    size:
   2:
    mimetype: text/csv
    cache_url:
    hash: 93762ff3919569fb9280de38ad62dff8c2a1473d
    description: October 2011
    name: October 2011
    format: CSV
    url: http://www.newcastle.gov.uk/sites/drupalncc.newcastle.gov.uk/files/wwwfileroot/your-council/local_transparency/october_2011.csv
    datastore_active: 1
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2017-07-18T13:16:32.204705
    state: active
    mimetype_inner:
    last_modified: 2012-03-13T22:04:28.872581
    position: 2
    revision_id: 746c4bc2-7666-4519-a008-13ed98161b03
    url_type:
    id: 1d1c9089-7037-48a3-a70d-fbecf146238f
    resource_type: file
    size: 850440
   3:
    mimetype: text/csv
    cache_url:
    hash: 1a7a576dfd490153f6097602bb64a2312079aa47
    description: September 2011
    name: September 2011
    format: CSV
    url: http://www.newcastle.gov.uk/sites/drupalncc.newcastle.gov.uk/files/wwwfileroot/your-council/local_transparency/september_2011.csv
    datastore_active: 1
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2012-06-06T15:54:48.643419
    state: active
    mimetype_inner:
    last_modified: 2012-06-13T07:57:00.966643
    position: 3
    revision_id: 746c4bc2-7666-4519-a008-13ed98161b03
    url_type:
    id: ff9038ef-41fd-4b00-9b1e-e942fbdaaf25
    resource_type: file
    size: 764773
   4:
    mimetype: text/csv
    cache_url:
    hash: 224ba4b7482d3cdd7e6b2373679a9cfaf8eb8dac
    description:
    name: January 2012
    format: CSV
    url: http://www.newcastle.gov.uk/sites/drupalncc.newcastle.gov.uk/files/wwwfileroot/your-council/local_transparency/january_2012.csv
    datastore_active: 1
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2012-08-14T12:39:24.519707
    state: active
    mimetype_inner:
    last_modified: 2012-08-14T12:39:35.638235
    position: 4
    revision_id: 746c4bc2-7666-4519-a008-13ed98161b03
    url_type:
    id: d51c9bd4-8256-4289-bdd7-962f8572efb0
    resource_type: file
    size: 1080880
   5:
    mimetype: text/csv
    cache_url:
    hash: 4cd5541587fe172ceaf59dc941e00b755ff1bdb5
    description:
    name: February 2012
    format: CSV
    url: http://www.newcastle.gov.uk/sites/drupalncc.newcastle.gov.uk/files/wwwfileroot/your-council/local_transparency/february_2012.csv
    datastore_active: 1
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2012-08-14T12:47:25.494670
    state: active
    mimetype_inner:
    last_modified: 2012-08-14T12:47:35.250641
    position: 5
    revision_id: 746c4bc2-7666-4519-a008-13ed98161b03
    url_type:
    id: 5b958b29-a399-41aa-86ff-1d198a124140
    resource_type: file
    size: 951982
   6:
    mimetype:
    cache_url:
    hash:
    description:
    name:
    format:
    url:
    datastore_active:
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2017-10-10T10:59:17.956483
    state: active
    mimetype_inner:
    last_modified:
    position: 6
    revision_id: 0282f387-916b-46c5-9b90-6ac87bcdbae3
    url_type:
    id: 4542f583-e017-45f4-bd17-0ca9909542f7
    resource_type:
    size:
   7:
    mimetype:
    cache_url:
    hash:
    description:
    name:
    format:
    url:
    datastore_active:
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2017-10-10T10:59:35.880697
    state: active
    mimetype_inner:
    last_modified:
    position: 7
    revision_id: ba006e26-6540-4728-9cc9-9a0140409b2f
    url_type:
    id: 9ce8e694-3ab8-48b2-8774-6178c172bd38
    resource_type:
    size:
   8:
    mimetype:
    cache_url:
    hash:
    description: short description
    name: Polish portal
    format: application/x-perl
    url: http://onet.pl
    datastore_active:
    cache_last_updated:
    package_id: b9076e40-80ea-480b-b330-e399d7a8c09b
    created: 2017-11-08T09:52:52.222846
    state: active
    mimetype_inner:
    last_modified:
    position: 8
    revision_id: ba006e26-6540-4728-9cc9-9a0140409b2f
    url_type:
    id: 6b95e76f-89ff-4ed5-ac44-dccc0f7cd9a2
    resource_type:
    size:
  num_resources: 9
  tags:
   0:
    vocabulary_id:
    state: active
    display_name: city-newcastle-upon-tyne
    id: 8a3e0bc8-a178-4669-9eb0-c0c763acc824
    name: city-newcastle-upon-tyne
   1:
    vocabulary_id:
    state: active
    display_name: country.uk
    id: 16c3e784-d1a8-4f67-9335-74c7b3ec39d4
    name: country.uk
   2:
    vocabulary_id:
    state: active
    display_name: spending
    id: 46d73914-9e2b-43b8-b079-2195266aff31
    name: spending
  groups:
   0:
    display_name: Data Explorer Examples
    description: This group contains various real datasets that show CKAN’s data previewer in action. The previewer shows a configurable grid view of tabular data, plots columns of data on a graph, and shows geo-coded data on an interactive map. It can also preview image files and web pages.
    image_display_url: http://farm8.staticflickr.com/7129/7041988029_411d985015_c.jpg
    title: Data Explorer Examples
    id: 93327dc5-7615-4e11-bf17-974d30692ca5
    name: data-explorer
  license_id: cc-by
  relationships_as_subject:
  organization:
  name: newcastle-city-council-payments-over-500
  isopen: 1
  url: http://www.newcastle.gov.uk/your-council/local-transparency/payments-over-500
  notes: Newcastle City Council spending data over £500. Data is published monthly and shows who was paid, how much was paid, and what this was for. This will include : * all items we purchase * payments we make to contractors carrying out work on our behalf * other spend we incur in carrying out our business. What will be excluded : * payments made to staff * housing benefit payments * sensitive social services information which could put * vulnerable individuals at risk * personal information, such as the names of individuals receiving payments * confidential information, such as council tax or business rate refund. The site offers monthly spending reports, only the last three are included here.
  owner_org:
  extras:
   0:
    key: doi
    value: some_doi
   1:
    key: spatial
    value: { "type" : "Polygon", "coordinates" : [ [ [-1.5308, 54.9588],[-1.5308, 55.0796], [-1.7753, 55.0796], [-1.7753, 54.9588], [-1.5308, 54.9588] ] ] }
   2:
    key: spatial-text
    value: Newcastle upon Tyne, North East England, England, United Kingdom
  license_url: http://www.opendefinition.org/licenses/cc-by
  title: Newcastle City Council : Payments over £500
  revision_id: 27b3674c-a436-428d-8791-2f1f67f8e6c3
 1:
  license_title: Creative Commons Attribution Share-Alike
  maintainer:
  relationships_as_object:
  private:
  maintainer_email:
  num_tags: 5
  id: beb6c3a6-098d-4389-b0a2-de0243728b42
  metadata_created: 2017-07-18T13:16:28.631451
  metadata_modified: 2018-07-27T07:28:18.832393
  author: Lucy Chambers
  author_email:
  state: active
  version:
  creator_user_id: bbe1265b-8ff1-4b39-a857-fc2e9eed2057
  type: dataset
  resources:
   0:
    mimetype:
    cache_url:
    hash:
    description: Adur District Council April 2009
    name:
    format: CSV
    url: http://ckan.net/storage/f/file/3ffdcd42-5c63-4089-84dd-c23876259973
    datastore_active:
    cache_last_updated:
    package_id: beb6c3a6-098d-4389-b0a2-de0243728b42
    created: 2017-07-18T13:16:28.648926
    state: active
    mimetype_inner:
    last_modified:
    position: 0
    revision_id: 8b4812ec-05f6-4df2-8b3c-c69db7da1f63
    url_type:
    id: 281dffa6-ea9b-4446-be41-05dced06591f
    resource_type: file
    size:
   1:
    mimetype:
    cache_url:
    hash:
    description: Mapping Metadata for Adur
    name:
    format: JSON
    url: http://ckan.net/storage/f/file/c8ce520c-c2e6-463a-99a3-ad24b023ccb4
    datastore_active:
    cache_last_updated:
    package_id: beb6c3a6-098d-4389-b0a2-de0243728b42
    created: 2017-07-18T13:16:28.648955
    state: active
    mimetype_inner:
    last_modified:
    openspending_hint: model
    position: 1
    revision_id: 8b4812ec-05f6-4df2-8b3c-c69db7da1f63
    url_type:
    id: 6cce3936-b169-4d12-82ba-65fcb79734a0
    resource_type: file
    size:
   2:
    mimetype:
    cache_url:
    hash:
    description: Revised CSV for import
    name:
    format: CSV
    url: http://mk.ucant.org/info/data/adur.csv
    datastore_active: 1
    cache_last_updated:
    package_id: beb6c3a6-098d-4389-b0a2-de0243728b42
    created: 2017-07-18T13:16:28.648967
    state: active
    mimetype_inner:
    last_modified:
    openspending_hint: data
    position: 2
    revision_id: 7e854221-ec7f-4cad-b0f6-061406138181
    url_type:
    id: 04127ad5-77e5-4a08-9f40-12d3c383e460
    resource_type: file
    size:
   3:
    mimetype:
    cache_url:
    hash:
    description: tset
    name: test
    format:
    url: http://samplecsvs.s3.amazonaws.com/Sacramentorealestatetransactions.csv
    datastore_active:
    cache_last_updated:
    package_id: beb6c3a6-098d-4389-b0a2-de0243728b42
    created: 2018-05-02T07:41:39.508184
    state: active
    mimetype_inner:
    last_modified:
    position: 3
    revision_id: 822460b4-b7fd-41ae-ae91-68a03bd82031
    url_type:
    id: bedf8aa5-edb7-4c4b-b959-0dd5f39b621e
    resource_type:
    size:
  num_resources: 4
  tags:
   0:
    vocabulary_id:
    state: active
    display_name: country-uk
    id: e0e95afd-325c-4b02-bea9-b08955b6b5b7
    name: country-uk
   1:
    vocabulary_id:
    state: active
    display_name: date-2009
    id: 4ec89897-b3ae-4dd5-b4ca-fac9129540ac
    name: date-2009
   2:
    vocabulary_id:
    state: active
    display_name: openspending
    id: d8bfaad5-6d65-4388-91cb-95e31e7a2dc0
    name: openspending
   3:
    vocabulary_id:
    state: active
    display_name: regiona
    id: ffdb3438-1321-4c83-90ba-80a0437d5e7c
    name: regiona
   4:
    vocabulary_id:
    state: active
    display_name: regional
    id: 2ce67eb3-6022-47f9-b135-f6fd23d78804
    name: regional
  groups:
   0:
    display_name: Data Explorer Examples
    description: This group contains various real datasets that show CKAN’s data previewer in action. The previewer shows a configurable grid view of tabular data, plots columns of data on a graph, and shows geo-coded data on an interactive map. It can also preview image files and web pages.
    image_display_url: http://farm8.staticflickr.com/7129/7041988029_411d985015_c.jpg
    title: Data Explorer Examples
    id: 93327dc5-7615-4e11-bf17-974d30692ca5
    name: data-explorer
  license_id: cc-by-sa
  relationships_as_subject:
  organization:
  name: adur_district_spending
  isopen: 1
  url: http://www.spotlightonspend.org.uk/Downloads/1038
  notes: Emphasis **bold** *italics*  strikethrough  Headers # Big header ## Medium header ### Small header #### Tiny header  ![](https://images.pexels.com/photos/8633/nature-tree-green-pine.jpg?auto=compress&cs=tinysrgb&h=350) Lists * Generic list item * Generic list item * Generic list item 1. Numbered list item 2. Numbered list item 3. Numbered list item Links [Text to display](http://www.example.com) Quotes > This is a quote. > It can span multiple lines ! Images Need to upload an image ? Imgur has a great interface.  ![](http://www.example.com/image.jpg) Tables | Column 1 | Column 2 | Column 3 | | -------- | -------- | -------- | | John | Doe | Male | | Mary | Smith | Female | Or without aligning the columns... | Column 1 | Column 2 | Column 3 | | -------- | -------- | -------- | | John | Doe | Male | | Mary | Smith | Female | Displaying code `var example = "hello !" ;` Or spanning multiple lines... ``` var example = "hello !" ; alert(example) ; ```  ![](https://images.pexels.com/photos/8633/nature-tree-green-pine.jpg?auto=compress&cs=tinysrgb&h=350)
  owner_org:
  extras:
   0:
    key: asdasd
    value: asdasd
   1:
    key: asdsa1111
    value: asdasd2222
   2:
    key: spatial
    value: { "type" : "Polygon", "coordinates" : [ [ [-0.3715, 50.8168],[-0.3715, 50.8747], [-0.2155, 50.8747], [-0.2155, 50.8168], [-0.3715, 50.8168] ] ] }
   3:
    key: spatial-text
    value: Adur, West Sussex, South East England, England, United Kingdom
   4:
    key: spatial2
    value: { "type" : "Point", "coordinates" : [-3.145,53.078] }
  license_url: http://www.opendefinition.org/licenses/cc-by-sa
  title: UK : Adur District Council Spending Data
  revision_id: ea6af97f-0a19-4bf4-92aa-bae0c49d62f4
 2:
  license_title: Creative Commons Attribution
  maintainer: Francisco Javier Flores Flores Palacios
  relationships_as_object:
  private:
  maintainer_email: javierfjfp94@gmail.com
  num_tags: 3
  id: 64724bf1-69cd-4e33-9fc0-0c6577e6ccf9
  metadata_created: 2017-10-16T19:59:08.910129
  metadata_modified: 2017-10-16T20:36:18.284659
  author: Francisco Javier Flores Flores Palacios
  author_email: javierfjfp94@gmail.com
  state: active
  version:
  creator_user_id: f1353947-5168-49c4-8ff6-91dd376a27f5
  type: dataset
  resources:
   0:
    mimetype:
    cache_url:
    hash:
    description: A pdf report with information about the situation of the education in London (quality, expected progress, comparison with the national average, level of students...)
    name: London Annual Education Report 2015
    format: PDF
    url: https://files.datapress.com/london/dataset/london-annual-education-report-2015/2015-12-01T08:54:32/GLA Annual Education Report 2015.pdf
    datastore_active:
    cache_last_updated:
    package_id: 64724bf1-69cd-4e33-9fc0-0c6577e6ccf9
    created: 2017-10-16T20:02:37.944433
    state: active
    mimetype_inner:
    last_modified:
    position: 0
    revision_id: 411c5f3a-2c64-4870-960a-7fa8aabd2e85
    url_type:
    id: d7de25a5-c6b8-4b2e-9c6f-05b1319c3092
    resource_type:
    size:
   1:
    mimetype:
    cache_url:
    hash:
    description: A kmz file with allows to display in a map a layer with the position of each school, name, type, districts...
    name: London Schools Atlas
    format: KMZ
    url: https://demo.ckan.org/dataset/64724bf1-69cd-4e33-9fc0-0c6577e6ccf9/resource/3b0db5c2-2916-4a1c-877e-9a22e70e7372/download/all_schools_2016.kmz
    datastore_active:
    cache_last_updated:
    package_id: 64724bf1-69cd-4e33-9fc0-0c6577e6ccf9
    created: 2017-10-16T20:18:36.300994
    state: active
    mimetype_inner:
    last_modified:
    position: 1
    revision_id: ae304e0c-fcb3-4bed-8044-e33ebfc65c6a
    url_type: upload
    id: 3b0db5c2-2916-4a1c-877e-9a22e70e7372
    resource_type:
    size:
   2:
    mimetype:
    cache_url:
    hash:
    description: A csv file containing a table with results of a statistical research about children who spend at least two hours per week at school sports.
    name: Physically active children
    format: CSV
    url: https://files.datapress.com/london/dataset/physically-active-children/active-children-borough.csv
    datastore_active: 1
    cache_last_updated:
    package_id: 64724bf1-69cd-4e33-9fc0-0c6577e6ccf9
    created: 2017-10-16T20:36:18.354770
    state: active
    mimetype_inner:
    last_modified:
    position: 2
    revision_id: ae304e0c-fcb3-4bed-8044-e33ebfc65c6a
    url_type:
    id: b998aff7-42db-49dc-9e41-f40b558b74b1
    resource_type:
    size:
  num_resources: 3
  tags:
   0:
    vocabulary_id:
    state: active
    display_name: education
    id: 2f9d6731-6d33-43d4-9110-291086bd38d5
    name: education
   1:
    vocabulary_id:
    state: active
    display_name: london
    id: 34bb18de-5162-4104-988d-1e322c4d980f
    name: london
   2:
    vocabulary_id:
    state: active
    display_name: uk
    id: 85de8bcc-fe5c-4821-9970-0b20e5d36f34
    name: uk
  groups:
  license_id: cc-by
  relationships_as_subject:
  organization:
   description: A little organization which collects dataset in regards to different matters concerning UK (safety situation, geography, urbanism...)
   title: UK_miscellany
   created: 2017-10-15T19:04:06.019403
   approval_status: approved
   is_organization: 1
   state: active
   image_url: https://www.flickr.com/photos/pablodamon/8129102935/in/photolist-dokM6a-feQvR7-7673Tn-8o5Auf-f6q9vC-cyZsi3-9JhKdB-5gf5HA-9MHLC9-8bkvxZ-dZzoEe-7d1Fi1-d5GKzJ-nwtuac-puUiXG-nwtPvg-9uCqVu-7zy512-4Kcztg-dQ7yG5-4gmbyh-696M7y-5E8xNi-fuW8Cv-7tscNf-dKQGm6-drWWoH-6zWVpy-ffib9V-9J4dMa-fa5Vpz-6Lz8zt-oLj1vs-dyx2CD-9fvNkx-cgs5nC-oMbmUU-ehTPd9-4SYrCe-dTj7S3-dat5Pa-egmRk6-ehCnCD-pYa7oj-pFizuD-kQ33R1-fJhCqe-kBKu1p-pLv97g-fBTMKK
   revision_id: d2ec77b5-3cb8-4df7-ae6a-110fdd8a81c1
   type: organization
   id: 57c79431-e719-44e5-a090-b5c8e577846c
   name: fjfp_organization
  name: education-in-london
  isopen: 1
  url: https://data.london.gov.uk/
  notes: Dataset storing different files concerning education sector : schools, universities, libraries...
  owner_org: 57c79431-e719-44e5-a090-b5c8e577846c
  extras:
  license_url: http://www.opendefinition.org/licenses/cc-by
  title: Education in London
  revision_id: 411c5f3a-2c64-4870-960a-7fa8aabd2e85
 3:
  license_title: Open Data Commons Open Database License (ODbL)
  maintainer:
  relationships_as_object:
  private:
  maintainer_email:
  num_tags: 5
  id: a85fe9db-5db3-49c0-af55-94d1e3a2c84d
  metadata_created: 2018-09-10T03:42:57.371713
  metadata_modified: 2018-09-10T03:44:07.298750
  author: vijay sharma
  author_email: 001vashikaranspecialist@gmail.com
  state: active
  version: 6.0
  creator_user_id: 4b390d21-9dc7-4a7c-b14b-5cf4c104b365
  type: dataset
  resources:
   0:
    mimetype:
    cache_url:
    hash:
    description: ☎What’s app No +91-7023515920 #vashikaranspecialist #blackmagicmantra #divorceproblem #exlovebackmantra #worldfamousloveguru #loveproblemsolution #husbandwifeproblemsolution #tantramantraspecialist #powerfulllovevashikaran #lovevashikaranspecialist #lovemarriagespecialist Call Now +91-7023515920 All Problem Solution GuruJi Love is one of the most beautiful things in our nature. Every people love someone at least once in their life, but many people don’t understand its important in their life while many has to face many problems to getting their love and the reason behind this are : old thinking of our society, parental objection, mutual understanding of lover, etc. People who are in love wants to spend most of their moments with their love and make all of their moments very happy and memorable with each other. Every people have their own individual problems and issues in life related to love, marriage, etc. Many people wants to getting married with their love but due to the problems which we discussed above they don’t get their love for their whole life or facing many issues in this, but now they don’t have to face such issues for long time in their life. Love problem specialist ‘Guru ji’ is now available 24*7 with you to listen your problems and providing the proper solution for your love problems. You can contact him if you are facing any types of problems in your love life, such as : if you want to get back your love in your life, if you want to getting married with your love, if you have mutual understanding problems with your partners, etc. Website :-http://www.exlovevashikaran.com
    name: vijay sharma
    format:
    url: http://www.exlovevashikaran.com
    datastore_active:
    cache_last_updated:
    package_id: a85fe9db-5db3-49c0-af55-94d1e3a2c84d
    created: 2018-09-10T03:44:06.851295
    state: active
    mimetype_inner:
    last_modified:
    position: 0
    revision_id: eb641fd9-1c30-40b3-b3f6-5e037229bec0
    url_type:
    id: 09cc165f-4fe5-4713-95c4-e65c11352596
    resource_type:
    size:
  num_resources: 1
  tags:
   0:
    vocabulary_id:
    state: active
    display_name: astrologer
    id: 9ee23dd6-4200-4ff7-a2ae-7a947c801336
    name: astrologer
   1:
    vocabulary_id:
    state: active
    display_name: black magic
    id: 5a9e5f47-01fe-4074-8a9d-30adb3cb14cf
    name: black magic
   2:
    vocabulary_id:
    state: active
    display_name: love problem
    id: b80d586d-3ff4-4082-a4a2-725ace625969
    name: love problem
   3:
    vocabulary_id:
    state: active
    display_name: vashikaran mantra
    id: 168d67b3-a9bb-441f-abe4-38059030b2d4
    name: vashikaran mantra
   4:
    vocabulary_id:
    state: active
    display_name: vashikaran specialist
    id: 35d267cb-1f14-4d58-8d95-df26a071f509
    name: vashikaran specialist
  groups:
  license_id: odc-odbl
  relationships_as_subject:
  organization:
   description: ☎What’s app No +91-7023515920 #vashikaranspecialist #blackmagicmantra #divorceproblem #exlovebackmantra #worldfamousloveguru #loveproblemsolution #husbandwifeproblemsolution #tantramantraspecialist #powerfulllovevashikaran #lovevashikaranspecialist #lovemarriagespecialist Call Now +91-7023515920 All Problem Solution GuruJi Love is one of the most beautiful things in our nature. Every people love someone at least once in their life, but many people don’t understand its important in their life while many has to face many problems to getting their love and the reason behind this are : old thinking of our society, parental objection, mutual understanding of lover, etc. People who are in love wants to spend most of their moments with their love and make all of their moments very happy and memorable with each other. Every people have their own individual problems and issues in life related to love, marriage, etc. Many people wants to getting married with their love but due to the problems which we discussed above they don’t get their love for their whole life or facing many issues in this, but now they don’t have to face such issues for long time in their life. Love problem specialist ‘Guru ji’ is now available 24*7 with you to listen your problems and providing the proper solution for your love problems. You can contact him if you are facing any types of problems in your love life, such as : if you want to get back your love in your life, if you want to getting married with your love, if you have mutual understanding problems with your partners, etc. Website :-http://www.exlovevashikaran.com
   created: 2018-09-10T03:39:10.089148
   title: Love Vashikaran Specialist +91-7023515920
   name: love-vashikaran-specialist-91-7023515920
   is_organization: 1
   state: active
   image_url: 2018-09-10-033910.03485800000.jpg
   revision_id: d85b8af8-527c-4110-9e22-49d8ae3bf1de
   type: organization
   id: 0234fc4f-d554-4aa7-9290-6d3caaa6e081
   approval_status: approved
  name: vashikaran-specialist-91-7023515920
  isopen: 1
  url: http://www.exlovevashikaran.com
  notes: ☎What’s app No +91-7023515920 #vashikaranspecialist #blackmagicmantra #divorceproblem #exlovebackmantra #worldfamousloveguru #loveproblemsolution #husbandwifeproblemsolution #tantramantraspecialist #powerfulllovevashikaran #lovevashikaranspecialist #lovemarriagespecialist Call Now +91-7023515920 All Problem Solution GuruJi Love is one of the most beautiful things in our nature. Every people love someone at least once in their life, but many people don’t understand its important in their life while many has to face many problems to getting their love and the reason behind this are : old thinking of our society, parental objection, mutual understanding of lover, etc. People who are in love wants to spend most of their moments with their love and make all of their moments very happy and memorable with each other. Every people have their own individual problems and issues in life related to love, marriage, etc. Many people wants to getting married with their love but due to the problems which we discussed above they don’t get their love for their whole life or facing many issues in this, but now they don’t have to face such issues for long time in their life. Love problem specialist ‘Guru ji’ is now available 24*7 with you to listen your problems and providing the proper solution for your love problems. You can contact him if you are facing any types of problems in your love life, such as : if you want to get back your love in your life, if you want to getting married with your love, if you have mutual understanding problems with your partners, etc. Website :-http://www.exlovevashikaran.com
  owner_org: 0234fc4f-d554-4aa7-9290-6d3caaa6e081
  extras:
  license_url: http://www.opendefinition.org/licenses/odc-odbl
  title: Vashikaran Specialist +91-7023515920
  revision_id: eb641fd9-1c30-40b3-b3f6-5e037229bec0
search_facets:

Twitter API

L’exemple de l’API Twitter est intéressant, car c’est une API qui ne peut être intérrogée qu’au moyen d’un processus d’authentification OAuth, et non simplement en interrogeant une URL.

Nous utilisons pour ce faire le plugin Twitter pour SPIP qui intègre une méthode twitter pour la boucle (DATA).

Il devient alors aussi facile d’interroger Twitter à travers son API propriétaire que d’utiliser une simple API en REST :

Le code

  1. <B_tweets>
  2.   <ul class='liste-items'>
  3.     <BOUCLE_tweets(DATA)
  4.      {source twitter,search/tweets?q=%23spip}
  5.      {datapath statuses}
  6.      {pagination 10}>
  7.       <li class='item tweet'>
  8.         <img src='#VALEUR{user/profile_image_url}' style='float:right' />
  9.         <a href='http://twitter.com/#VALEUR{user/screen_name}'>
  10.           @[(#VALEUR{user/screen_name})] (#VALEUR{user/name})
  11.         </a> :
  12.         <q>#VALEUR{text}</q>
  13.       </li>
  14.     </BOUCLE_tweets>
  15.   </ul>
  16.   [<div class='pagination'>(#PAGINATION{precedent_suivant})</div>]
  17. </B_tweets>

Télécharger

Le résultat

Aucun résultat