source: sipes/modules_contrib/services_views/README @ 8a8efa8

stableversion-3.0
Last change on this file since 8a8efa8 was 3959b2a, checked in by planificacion <planificacion@…>, 8 años ago

Se agregaron los modulos para permitir el despliegue de servicios web (SOAP)

  • Propiedad mode establecida a 100644
File size: 2.4 KB
Línea 
1* What it does
2
3services_views in combination with the Services module version 3.x and later
4allows you to access and retrieve views via a service endpoint.
5
6* Prerequisites
7
8Services module version 3.x and later is a dependency and you should read up
9about the different service callbacks available from that module and how to set
10up endpoints and resources.
11
12* Configuring with an endpoint
13
14Once you have an endpoint set up, visit the resources section of the endpoint
15and enable the views resource.
16
17* Basic Usage
18
19The most basic usage is http://example.com/my_endpoint/views/view_name which
20will retrieve the whole view.
21
22A useful tool in firefox for testing services in general is the HttpRequester
23addon that lets you do all sorts of CRUD.
24
25A basic example in HttpRequester
26
271.
28* URL: http://example.com/my_endpoint/user/login
29* Content type: application/json
30* Content box: {"username":"blah","password":"blahblah"}
31* Click post.
32
33You should get a 200 ok reponse. You are now logged in.
34
352.
36* URL: http://example.com/my_endpoint/views/view_name
37* Click get.
38
39You should get a 200 ok response and a nice big blob of json containing your view.
40
41* Arguments and Parameters to Views (limit, offset, args, display_id)
42
43Based on the full details in the module:
44
45services_views_retrieve($view_name, $display_id = 'default', $args = array(),
46$offset = 0, $limit = 10, $return_type = FALSE, $filters = array())
47
48/**
49* Callback for retrieving views resources.
50*
51* @param $view_name
52*   String. The views name.
53* @param $display_id
54*   String (optional). The views display name.
55* @param $offset
56*   Integer (optional). An offset integer for paging.
57* @param $limit
58*   Integer (optional). A limit integer for paging.
59* @param $args
60*   Array (optional). A list of arguments to pass to the view.
61* @param $return_type
62*   String (optional). Whether to return the raw data results (FALSE), the entire views object ('view') or themed results ('theme').
63* @param $args
64*   Array (optional). A list of exposed filters to pass to the view.
65*
66* @return
67*  Array. The views return.
68*/
69
70The arguments are passed in the usual url format, for example:
71http://example.com/my_endpoint/views/view_name?display_id=default&args=123&offset=0&limit=10&return_type=FALSE
72
73Multiple arguments can be used like this:
74http://example.com/my_endpoint/views/view_name?display_id=default&args[0]=abc&args[1]=123&offset=0&limit=10&return_type=FALSE
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.