{"__v":77,"_id":"54fdf1e47ed77417002c5384","category":{"__v":16,"_id":"54e49219e4365521006fd9ee","pages":["54e4934e610dfd0d00b2a863","54e49857610dfd0d00b2a869","54e4d1b418155617007884de","54e4eaff1815561700788522","54e50932d71c112d005440e6","54e50982d71c112d005440e8","54e612b3cf61ff0d00cf95b6","54e62e81a6972f0d002556d6","54ec82cb5033a62b005b257a","54edebbe3749bf0d00c764f8","54ededd28dafa7250027e64d","54ee3be3ae79c92d000f41b4","54ee4c11df57670d00871c8e","54f9ba2167e8f20d0096da6f","54fdf1e47ed77417002c5384","55106b1a23eca20d0038d0dc"],"project":"54d0fd1d095c470d00d1646d","version":"54d0fd1e095c470d00d16470","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-18T13:22:33.459Z","from_sync":false,"order":0,"slug":"guides","title":"Guides"},"project":"54d0fd1d095c470d00d1646d","user":"54db646008ea010d00ab1fe1","version":{"__v":20,"_id":"54d0fd1e095c470d00d16470","project":"54d0fd1d095c470d00d1646d","createdAt":"2015-02-03T16:53:50.090Z","releaseDate":"2015-02-03T16:53:50.090Z","categories":["54d0fd1e095c470d00d16471","54d8b5e68934140d00496544","54db6361c6a4d40d0034b8f7","54db638208ea010d00ab1fdd","54db639008ea010d00ab1fde","54db6547c6a4d40d0034b8fd","54db83482092743700ea6ee1","54db84afc6a4d40d0034b93c","54db8805c6a4d40d0034b93f","54db8de9c6a4d40d0034b961","54db931ac6a4d40d0034b96d","54e49219e4365521006fd9ee","54e74fcc652d7c1900cbe737","54e74ffd3c1e111700d05762","54e77e0a523b1b2f00e6f313","54e784affdabe62500fcddcf","54e784fa523b1b2f00e6f319","54e785de8ae8911900cd42c5","54fdad6e660db63700c23b82","54fdff31f7b1202100a25e06"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-03-09T19:17:56.307Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"Here in this guide you'll find some essential information about **goGeo** API, including basic authentication, pagination and filters. The topics are grouped as subsections of this document as described below:\n\n1. [Basic Authentication](/v1.0/docs/api-basics#basic-authentication).\n2. [Pagination](/v1.0/docs/api-basics#pagination).\n3. [Filters](/v1.0/docs/api-basics#filters).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Basic Authentication\"\n}\n[/block]\n\nTo apply user access control and other security features, the **goGeo** platform performs some user authentication routines. It requires an authentication step in two specific cases: when logging in the **goGeo** Console and when requesting an API endpoint.   \n\n###**Web Console user access authentication**\n\nTo access the **goGeo** Console, you need to inform your identification (e-mail informed on registration) and a password. On Console, you can see your keys for the other kind of authentication (API endpoints), as Figure 1 shows:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ZBOK5AO6TZWy4zIJiP04_Sem%20título4.png\",\n        \"Sem título4.png\",\n        \"1024\",\n        \"255\",\n        \"#ef2726\",\n        \"\"\n      ],\n      \"caption\": \"Figure 1: API-KEY and MAP-KEY on Console Dashboard.\"\n    }\n  ]\n}\n[/block]\n###**goGeo API endpoints authentication**\n\nThe authentication of all **goGeo** API endpoint is based on [HTTP Basic Auth](http://www.w3.org/Protocols/HTTP/1.0/spec.html#BasicAA). This authentication is not a security mechanism, it is only used to identify a user on **goGeo** platform. Each user has two keys:\n\n * **MAP-KEY**:  Used to retrieve data and/or view it on a map. This key must be used on Map Rendering and Geo Services.\n\n *  **API-KEY** : Used to manage user data, allowing to create, update and delete documents, collections and databases.\n\nIt's important to observe that user account restrictions are applied over any kind of user access, be it by endpoint requests or Console access.\n\n###**Authentication in endpoints documentation**\n\nIn each endpoint documentation, there is a way to test it. Taking the section [Creating a database](doc:creating-a-database) endpoint as example, in the page's bottom you can see a *Try It Out* form, which you can use to test the endpoint as you can see in the Figure 2.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/PEQdy6MuSrGM4NjdyflL_Sem%20título.png\",\n        \"Sem título.png\",\n        \"589\",\n        \"154\",\n        \"#51a875\",\n        \"\"\n      ],\n      \"caption\": \"Figure 2: Way to try it out.\"\n    }\n  ]\n}\n[/block]\nTo authenticate, you need to inform your **KEY** by clicking on the key icon in right corner (marked with a red circle on image).  A pop-up will appear to put the KEY as presented in Figure 3.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/rY2ebRnSz6vyYUk3KRRQ_Sem%20título2.png\",\n        \"Sem título2.png\",\n        \"755\",\n        \"187\",\n        \"#60b97d\",\n        \"\"\n      ],\n      \"caption\": \"Figure 3: Endpoint authentication pop-up.\"\n    }\n  ]\n}\n[/block]\nIn the *username* field you will put your API-KEY. Depending on the operation you will use a MAP-KEY or an API-KEY. The password is ignored by **goGeo** platform, so you can type anything on it. Figure 4 shows a sample filled form.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/IDOoEBXmRcOrHza5IkJn_Sem%20título3.png\",\n        \"Sem título3.png\",\n        \"755\",\n        \"187\",\n        \"#61b982\",\n        \"\"\n      ],\n      \"caption\": \"Figure 4: A filled authentication form.\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Pagination\"\n}\n[/block]\nIn many services offered by **goGeo**, showing all results in a single response is not always the better option. This is a common issue when the result of your request has too many items. To avoid this problem, **goGeo** uses **pagination**.  With it, you can navigate by your results in short pages, improving your experience.\n\nTo understand this mechanism, suppose you want to see your data from collection *my_points* in database *db1*. There are 1000 documents. It does not make sense to show all these 1000 documents in a single page.\n\nTaking this example, you can see at [List documents](doc:list-all-collections-documents) documentation that this endpoint has two important parameters to deal with. These parameters are:\n\n * **limit** \n * **page**\n\nThe first one will set the amount of documents that will be returned by your request. So, if you set the *limit* to 10, it does not matter how many documents exist in the collection, just 10 of them will be returned.\n\nThe second one will set the part of data that would be presented. For example, setting it to 4, and *limit* to 10 in our supposed collection, it will be returned the documents in the positions from 31 to 40.\n\nThe formula to know what is the range that will be returned is easy:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"initial_range = (limit * (page - 1)) + 1\\nfinal_range = limit * page\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nWith this in mind, you can easily control your data presentation using pagination. It will improve the performance of your application. Furthermore, you will see this mechanism in many endpoints of the **goGeo** platform.\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Filters\"\n}\n[/block]\nThe **goGeo** platform has two classes of filters: spatial filters and relational filters. In almost all operations that accept filters, you can use both together.\n\n###**Spatial filter**\n\nSpatial filter means restrict the data by a given geometry. When it is applied, **goGeo** returns only the data located in the region defined by this geometry, like in Figure 1.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/KEdztyTbRx6NsrgGvU7t_Sem%20título%205.png\",\n        \"Sem título 5.png\",\n        \"843\",\n        \"497\",\n        \"#3c6295\",\n        \"\"\n      ],\n      \"caption\": \"Figure 1: Spatial filter applied to a map.\"\n    }\n  ]\n}\n[/block]\nTo do this, you need to pass a GeoJSON into a query. Below is presented an example using a spatial restriction over a Geo Search request.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k --user MAP-KEY:\\\"dc837a69-c74f-4641-a79d-2bf6e900a135\\\" -H \\\"Content-Type: application/json\\\" -XPOST \\\\\\n    \\\"https://api.gogeo.io/1.0/geosearch/demos/sample_simplegeo_50k\\\" -d '{\\n    \\t{\\n        \\\"geom\\\": {\\n          \\\"type\\\": \\\"Polygon\\\",\\n            \\\"coordinates\\\": [[\\n                  [\\n                    -67.1484375,\\n                    -32.249974455863295\\n                  ],\\n                  [\\n                    -67.1484375,\\n                    1.7575368113083254\\n                  ],\\n                  [\\n                    -32.6953125,\\n                    1.7575368113083254\\n                  ],\\n                  [\\n                    -32.6953125,\\n                    -32.249974455863295\\n                  ],\\n                  [\\n                    -67.1484375,\\n                    -32.249974455863295\\n                  ],\\n                  [\\n                    -67.1484375,\\n                    -32.249974455863295\\n                  ]\\n                ]]\\n        },\\n        \\\"limit\\\" : 10,\\n        \\\"fields\\\" : [\\\"name\\\", \\\"category\\\"]\\n      }\\n    }'\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### **Relational filter**\nThe relational queries of the **goGeo** platform is based on [Elasticsearch queries](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-search.html).\n\nLooking at the Elasticsearch query documentation you can easily make relational queries on **goGeo**. Below is a simple Elasticsearch query:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"query\\\" : {\\n  \\t\\\"term\\\" : { \\\"name\\\" : \\\"Goldstream\\\" }\\n\\t}\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis query retrieves the documents in *sample_simplegeo_50k* that has 'Goldstream' in the field '*name*'. The same can be done in **goGeo** in the following way:\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"You will need to create a database 'demos' in your account and import the 'sample_simplegeo_50k' collection to this database.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl --user <API-KEY>:\\\"\\\" -k -H \\\"Content-Type: application/json\\\" -XGET \\\\\\n\\\"https://api.gogeo.io/1.0/databases/demos/collections/sample_simplegeo_50k/documents?sort=name&q=name:Goldstream\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nNote that this was a GET request. In this type of **goGeo** endpoints, the relational query will always works as a ElasticSearch *term query*.\n\nOn POST requests you can use more sophisticated queries passing the query on the request body, like a boolean query as below:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"query\\\": {\\n    \\\"bool\\\": {\\n      \\\"must\\\": [\\n        {\\n          \\\"query_string\\\": {\\n            \\\"fields\\\": [\\\"neighborhood\\\"],\\n            \\\"query\\\": \\\"capuava\\\"\\n          }\\n        },\\n        {\\n          \\\"query_string\\\": {\\n            \\\"fields\\\": [\\\"state\\\"],\\n            \\\"query\\\": \\\"go\\\"\\n          }\\n        },\\n        {\\n          \\\"query_string\\\": {\\n            \\\"fields\\\": [\\\"zipcode\\\"],\\n            \\\"query\\\": \\\"74*\\\"\\n          }\\n        }\\n      ]\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nIn the **goGeo** API, you can do something like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl --user <API-KEY>:\\\"\\\" -k -H \\\"Content-Type: application/json\\\" -XPOST \\\\\\n\\\"https://api.gogeo.io/1.0/databases/demos/collections/sample_simplegeo_50k/documents/query -d '\\n{\\n  \\\"q\\\":{\\n    \\\"bool\\\":{\\n      \\\"must\\\":[\\n        {\\n          \\\"query_string\\\":{\\n            \\\"fields\\\":[\\n              \\\"neighborhood\\\"\\n            ],\\n            \\\"query\\\":\\\"capuava\\\"\\n          }\\n        },\\n        {\\n          \\\"query_string\\\":{\\n            \\\"fields\\\":[\\n              \\\"state\\\"\\n            ],\\n            \\\"query\\\":\\\"go\\\"\\n          }\\n        },\\n        {\\n          \\\"query_string\\\":{\\n            \\\"fields\\\":[\\n              \\\"zipcode\\\"\\n            ],\\n            \\\"query\\\":\\\"74*\\\"\\n          }\\n        }\\n      ]\\n    }\\n  }\\n}'\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nNote that the attribute '*query*' was substituted by the parameter '*q*'.\nThese filters can be applied in most endpoints of the **goGeo** API.\n\n[block:html]\n{\n  \"html\": \"<div class='div-middle'> \\n  <a href='#'>\\n    Top page &spades; </div>\\n  </a>\\n</div>\\n\\n<div class='div-back'> \\n  <a href='/v1.0/docs/fundamentals'>\\n    &laquo; Back \\n  </a>\\n</div>\\n\\n<div class='div-forward'> \\n  <a href='/v1.0/docs/console'>\\n    Next &raquo; </div>\\n  </a>\\n</div>\\n\\n<style>\\n\\t.div-back {\\n  \\tpadding-left: 15px;\\n\\t\\tmargin-top: -20px;\\n  }\\n  \\n  .div-middle {\\n  \\ttext-align: center;\\n\\t\\tmargin-top: -15px;\\n  }\\n  \\n  .div-forward {\\n  \\tfloat: right;\\n    padding-right: 15px;\\n\\t\\tmargin-top: -20px;\\n  }\\n</style>\"\n}\n[/block]","excerpt":"goGeo API in a nutshell","slug":"api-basics","type":"basic","title":"API Basics"}

API Basics

goGeo API in a nutshell

Here in this guide you'll find some essential information about **goGeo** API, including basic authentication, pagination and filters. The topics are grouped as subsections of this document as described below: 1. [Basic Authentication](/v1.0/docs/api-basics#basic-authentication). 2. [Pagination](/v1.0/docs/api-basics#pagination). 3. [Filters](/v1.0/docs/api-basics#filters). [block:api-header] { "type": "basic", "title": "Basic Authentication" } [/block] To apply user access control and other security features, the **goGeo** platform performs some user authentication routines. It requires an authentication step in two specific cases: when logging in the **goGeo** Console and when requesting an API endpoint. ###**Web Console user access authentication** To access the **goGeo** Console, you need to inform your identification (e-mail informed on registration) and a password. On Console, you can see your keys for the other kind of authentication (API endpoints), as Figure 1 shows: [block:image] { "images": [ { "image": [ "https://files.readme.io/ZBOK5AO6TZWy4zIJiP04_Sem%20título4.png", "Sem título4.png", "1024", "255", "#ef2726", "" ], "caption": "Figure 1: API-KEY and MAP-KEY on Console Dashboard." } ] } [/block] ###**goGeo API endpoints authentication** The authentication of all **goGeo** API endpoint is based on [HTTP Basic Auth](http://www.w3.org/Protocols/HTTP/1.0/spec.html#BasicAA). This authentication is not a security mechanism, it is only used to identify a user on **goGeo** platform. Each user has two keys: * **MAP-KEY**: Used to retrieve data and/or view it on a map. This key must be used on Map Rendering and Geo Services. * **API-KEY** : Used to manage user data, allowing to create, update and delete documents, collections and databases. It's important to observe that user account restrictions are applied over any kind of user access, be it by endpoint requests or Console access. ###**Authentication in endpoints documentation** In each endpoint documentation, there is a way to test it. Taking the section [Creating a database](doc:creating-a-database) endpoint as example, in the page's bottom you can see a *Try It Out* form, which you can use to test the endpoint as you can see in the Figure 2. [block:image] { "images": [ { "image": [ "https://files.readme.io/PEQdy6MuSrGM4NjdyflL_Sem%20título.png", "Sem título.png", "589", "154", "#51a875", "" ], "caption": "Figure 2: Way to try it out." } ] } [/block] To authenticate, you need to inform your **KEY** by clicking on the key icon in right corner (marked with a red circle on image). A pop-up will appear to put the KEY as presented in Figure 3. [block:image] { "images": [ { "image": [ "https://files.readme.io/rY2ebRnSz6vyYUk3KRRQ_Sem%20título2.png", "Sem título2.png", "755", "187", "#60b97d", "" ], "caption": "Figure 3: Endpoint authentication pop-up." } ] } [/block] In the *username* field you will put your API-KEY. Depending on the operation you will use a MAP-KEY or an API-KEY. The password is ignored by **goGeo** platform, so you can type anything on it. Figure 4 shows a sample filled form. [block:image] { "images": [ { "image": [ "https://files.readme.io/IDOoEBXmRcOrHza5IkJn_Sem%20título3.png", "Sem título3.png", "755", "187", "#61b982", "" ], "caption": "Figure 4: A filled authentication form." } ] } [/block] [block:api-header] { "type": "basic", "title": "Pagination" } [/block] In many services offered by **goGeo**, showing all results in a single response is not always the better option. This is a common issue when the result of your request has too many items. To avoid this problem, **goGeo** uses **pagination**. With it, you can navigate by your results in short pages, improving your experience. To understand this mechanism, suppose you want to see your data from collection *my_points* in database *db1*. There are 1000 documents. It does not make sense to show all these 1000 documents in a single page. Taking this example, you can see at [List documents](doc:list-all-collections-documents) documentation that this endpoint has two important parameters to deal with. These parameters are: * **limit** * **page** The first one will set the amount of documents that will be returned by your request. So, if you set the *limit* to 10, it does not matter how many documents exist in the collection, just 10 of them will be returned. The second one will set the part of data that would be presented. For example, setting it to 4, and *limit* to 10 in our supposed collection, it will be returned the documents in the positions from 31 to 40. The formula to know what is the range that will be returned is easy: [block:code] { "codes": [ { "code": "initial_range = (limit * (page - 1)) + 1\nfinal_range = limit * page", "language": "javascript" } ] } [/block] With this in mind, you can easily control your data presentation using pagination. It will improve the performance of your application. Furthermore, you will see this mechanism in many endpoints of the **goGeo** platform. [block:api-header] { "type": "basic", "title": "Filters" } [/block] The **goGeo** platform has two classes of filters: spatial filters and relational filters. In almost all operations that accept filters, you can use both together. ###**Spatial filter** Spatial filter means restrict the data by a given geometry. When it is applied, **goGeo** returns only the data located in the region defined by this geometry, like in Figure 1. [block:image] { "images": [ { "image": [ "https://files.readme.io/KEdztyTbRx6NsrgGvU7t_Sem%20título%205.png", "Sem título 5.png", "843", "497", "#3c6295", "" ], "caption": "Figure 1: Spatial filter applied to a map." } ] } [/block] To do this, you need to pass a GeoJSON into a query. Below is presented an example using a spatial restriction over a Geo Search request. [block:code] { "codes": [ { "code": "curl -k --user MAP-KEY:\"dc837a69-c74f-4641-a79d-2bf6e900a135\" -H \"Content-Type: application/json\" -XPOST \\\n \"https://api.gogeo.io/1.0/geosearch/demos/sample_simplegeo_50k\" -d '{\n \t{\n \"geom\": {\n \"type\": \"Polygon\",\n \"coordinates\": [[\n [\n -67.1484375,\n -32.249974455863295\n ],\n [\n -67.1484375,\n 1.7575368113083254\n ],\n [\n -32.6953125,\n 1.7575368113083254\n ],\n [\n -32.6953125,\n -32.249974455863295\n ],\n [\n -67.1484375,\n -32.249974455863295\n ],\n [\n -67.1484375,\n -32.249974455863295\n ]\n ]]\n },\n \"limit\" : 10,\n \"fields\" : [\"name\", \"category\"]\n }\n }'", "language": "json" } ] } [/block] ### **Relational filter** The relational queries of the **goGeo** platform is based on [Elasticsearch queries](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-search.html). Looking at the Elasticsearch query documentation you can easily make relational queries on **goGeo**. Below is a simple Elasticsearch query: [block:code] { "codes": [ { "code": "{\n \"query\" : {\n \t\"term\" : { \"name\" : \"Goldstream\" }\n\t}\n}", "language": "json" } ] } [/block] This query retrieves the documents in *sample_simplegeo_50k* that has 'Goldstream' in the field '*name*'. The same can be done in **goGeo** in the following way: [block:callout] { "type": "warning", "title": "You will need to create a database 'demos' in your account and import the 'sample_simplegeo_50k' collection to this database." } [/block] [block:code] { "codes": [ { "code": "curl --user <API-KEY>:\"\" -k -H \"Content-Type: application/json\" -XGET \\\n\"https://api.gogeo.io/1.0/databases/demos/collections/sample_simplegeo_50k/documents?sort=name&q=name:Goldstream\"", "language": "curl" } ] } [/block] Note that this was a GET request. In this type of **goGeo** endpoints, the relational query will always works as a ElasticSearch *term query*. On POST requests you can use more sophisticated queries passing the query on the request body, like a boolean query as below: [block:code] { "codes": [ { "code": "{\n \"query\": {\n \"bool\": {\n \"must\": [\n {\n \"query_string\": {\n \"fields\": [\"neighborhood\"],\n \"query\": \"capuava\"\n }\n },\n {\n \"query_string\": {\n \"fields\": [\"state\"],\n \"query\": \"go\"\n }\n },\n {\n \"query_string\": {\n \"fields\": [\"zipcode\"],\n \"query\": \"74*\"\n }\n }\n ]\n }\n }\n}", "language": "json" } ] } [/block] In the **goGeo** API, you can do something like this: [block:code] { "codes": [ { "code": "curl --user <API-KEY>:\"\" -k -H \"Content-Type: application/json\" -XPOST \\\n\"https://api.gogeo.io/1.0/databases/demos/collections/sample_simplegeo_50k/documents/query -d '\n{\n \"q\":{\n \"bool\":{\n \"must\":[\n {\n \"query_string\":{\n \"fields\":[\n \"neighborhood\"\n ],\n \"query\":\"capuava\"\n }\n },\n {\n \"query_string\":{\n \"fields\":[\n \"state\"\n ],\n \"query\":\"go\"\n }\n },\n {\n \"query_string\":{\n \"fields\":[\n \"zipcode\"\n ],\n \"query\":\"74*\"\n }\n }\n ]\n }\n }\n}'", "language": "json" } ] } [/block] Note that the attribute '*query*' was substituted by the parameter '*q*'. These filters can be applied in most endpoints of the **goGeo** API. [block:html] { "html": "<div class='div-middle'> \n <a href='#'>\n Top page &spades; </div>\n </a>\n</div>\n\n<div class='div-back'> \n <a href='/v1.0/docs/fundamentals'>\n &laquo; Back \n </a>\n</div>\n\n<div class='div-forward'> \n <a href='/v1.0/docs/console'>\n Next &raquo; </div>\n </a>\n</div>\n\n<style>\n\t.div-back {\n \tpadding-left: 15px;\n\t\tmargin-top: -20px;\n }\n \n .div-middle {\n \ttext-align: center;\n\t\tmargin-top: -15px;\n }\n \n .div-forward {\n \tfloat: right;\n padding-right: 15px;\n\t\tmargin-top: -20px;\n }\n</style>" } [/block]