1angular.module("dictionaryConnectorApp").factory("dataFactory", function ($http) { 2 /** https://docs.angularjs.org/guide/providers **/ 3 var urlBase = "api/webapp/v1/"; 4 var _connDefFactory = {}; 5 _connDefFactory.getPageSections = function (pageCode) { 6 return $http.get(urlBase + "sections?page.code=" + pageCode + "&populate=sections.code,sections.name,sections.order,sections.sections,sections.sections.name,sections.sections.code,sections.sections.order"); 7 }; 8 _connDefFactory.getPageSectionsForIndex = function (pageCode) { 9 return $http.get(urlBase + "sections?page.code=" + pageCode + "&noFields=description&populate=sections.code,sections.name,sections.order,sections.sections,sections.sections.name,sections.sections.code,sections.sections.order"); 10 }; 11 _connDefFactory.getPageSection = function (pageSectionCode) { 12 return $http.get(urlBase + "sections/" + pageSectionCode + ""); 13 }; 14 15 _connDefFactory.getSearchConnectorDefinitions = function (searchAdvancedFilter, sectionsToSearch) { 16 var url; 17 var data; 18 19 data = { 20 "search_query": searchAdvancedFilter, 21 "sections_to_search": sectionsToSearch 22 }; 23 24 url = urlBase + "search_connector_definitions?noFields=description&populate=connector.code,connector.name,connector.sorting_name,definition.code,definition.name,definition.order,definition.authors&sort={\"field\":\"connector.sorting_name\",\"dir\":\"asc\"}"; 25 26 return $http.post(url, data); 27 }; 28 _connDefFactory.getConnectorDefinitions = function () { 29 return $http.get(urlBase + "connector_definitions?noFields=description&populate=connector.code,connector.name,connector.sorting_name,definition.code,definition.name,definition.order,definition.authors&sort={\"field\":\"connector.sorting_name\",\"dir\":\"asc\"}"); 30 }; 31 _connDefFactory.getDefinition = function (definitionCode) { 32 return $http.get(urlBase + "definitions/" + definitionCode + ""); 33 }; 34 35 _connDefFactory.getDefinitionAuthorsByDefinition = function (definition) { 36 return $http.get(urlBase + "definition_authors?definition.code=" + definition.code + "&populate=author.code,author.first_name,author.last_name"); 37 }; 38 39 _connDefFactory.getLanguages = function () { 40 return $http.get(urlBase + "languages"); 41 }; 42 43 _connDefFactory.getDefinitionAuthors = function () { 44 return $http.get(urlBase + "definition_authors?populate=definition.code,definition.name,definition.order,author.code,author.first_name,author.last_name&sort={\"field\":\"author.first_name,definition.code,definition.order\",\"dir\":\"asc\"}"); 45 }; 46 47 _connDefFactory.getConnectorDefinitionsByDefinition = function (definition) { 48 return $http.get(urlBase + "connector_definitions?definition.code=" + definition.code + "&populate=connector.code,connector.name"); 49 }; 50 51 _connDefFactory.getVisitors = function () { 52 return $http.get(urlBase + "visitors_count"); 53 }; 54 55 _connDefFactory.incrementVisitorsCount = function () { 56 return $http.post(urlBase + "visitors_count"); 57 }; 58 59 return _connDefFactory; 60});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.