Changes between Version 2 and Version 3 of Ticket #336


Ignore:
Timestamp:
06/10/10 09:40:46 (4 years ago)
Author:
dread
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #336 – Description

    v2 v3  
    55== I want to == 
    66 
    7 search for Package Resources, either by URL or other field, or just get them all. I want to be able to get all the fields. 
     7search for Package Resources, either by URL or other field, or just get them all. I want to be able to get all the resource's fields, such as URL. 
    88 
    99== Proposed implementation == 
     
    3131=== Examples === 
    3232 
    33 POST {{{ {"url": "scraperwiki.com", "all_fields": 1 }}},  to: /api/2/search/resource 
     33POST  
     34{{{ 
     35{"url": "scraperwiki.com", "all_fields": 1} 
     36}}} 
     37to: /api/2/search/resource 
    3438 
    35 returns 
     39returns JSON: 
    3640{{{ 
    37  [{"URL": "http://scraperwiki.com/lincolnshire-councillors", "format": "CSV", "Description": "Scrape of www.lincs.gov/councillors.pdf by ScraperWiki.", "hash": "", "package_id": "b8a325c8-af2a-43f3-8245-9db7d73dfbfe"}] 
     41 [{"URL": "http://scraperwiki.com/lincolnshire-councillors",  
     42   "format": "CSV",  
     43   "Description": "Scrape of www.lincs.gov/councillors.pdf by ScraperWiki.", 
     44   "hash": "", "package_id": "b8a325c8-af2a-43f3-8245-9db7d73dfbfe" 
     45 }] 
    3846}}} 
    3947 
     
    5058Key: all_fields 
    5159Value: 0 or 1 (0 is default) 
    52 Description: If 1 (true), the full record of the package resource (and it's package reference) are returned, rather than just the PackageResource ID. 
     60Description: If 1 (true), the full record of the package resource 
     61(and it's package reference) are returned, rather than just the 
     62PackageResource ID. 
     63}}} 
     64May also choose to introduce 'offset' and 'limit' to page through a large number of results. 
    5365 
    54 May also choose to introduce 'offset' and 'limit' to page through a large number of results. 
    55 }}} 
    5666== Original request == 
    5767