From 12900485c925c1f8caf3b111a0611177c46f9108 Mon Sep 17 00:00:00 2001 From: "A. David" Date: Fri, 14 Jul 2017 03:28:12 +0000 Subject: [PATCH 1/4] README --- backend/readme.md | 131 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 110 insertions(+), 21 deletions(-) diff --git a/backend/readme.md b/backend/readme.md index c2c9e78..3654991 100644 --- a/backend/readme.md +++ b/backend/readme.md @@ -1,21 +1,110 @@ -# Lumen PHP Framework - -[![Build Status](https://travis-ci.org/laravel/lumen-framework.svg)](https://travis-ci.org/laravel/lumen-framework) -[![Total Downloads](https://poser.pugx.org/laravel/lumen-framework/d/total.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![Latest Stable Version](https://poser.pugx.org/laravel/lumen-framework/v/stable.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![Latest Unstable Version](https://poser.pugx.org/laravel/lumen-framework/v/unstable.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![License](https://poser.pugx.org/laravel/lumen-framework/license.svg)](https://packagist.org/packages/laravel/lumen-framework) - -Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching. - -## Official Documentation - -Documentation for the framework can be found on the [Lumen website](http://lumen.laravel.com/docs). - -## Security Vulnerabilities - -If you discover a security vulnerability within Lumen, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. - -## License - -The Lumen framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) +# DataScouts API + +API for Social Media Aggregator + +## Introduction + +--- + +Hello, welcome onboard. + +This project design on [#oSoc17](2017.summerofcode.be/) is a little API to fetch data from different social media for specified entities. In short words, APi for Social Media Aggregator. + +This purpose of this document is to give an orverview about this project and necessary steps before working on it. + +## Table Of Contents + +--- + +- [Introduction](#introduction) +- [Technologies](#Technologies) +- [Laravel Packages](#laravel-packages) +- [Requirements](#requirements) +- [Installation](#getting-started) + - [Before Started](#before-started) + - [Get Started](#get-started) +- [Routes](#routes) + - [Endpoints](#endpoints) +- [Development](#dev) + - [Documentation](#dev-doc) + - [Hints - Guidelines](#dev-hints) + - [Enhancements](#dev-more) +- [License](#license) + +## Technologies + +--- + +This API exploits the following technologies : + +| **Name** | **Description**| **More infos**| +|------------|----------------|---------------| +| [Lumen v5.3](https://lumen.laravel.com/)| Fast micro-framework by Laravel |[Site web](https://lumen.laravel.com/docs/5.4)| +| [PHP Laravel v5.3](https://laravel.com/)| PHP FrameWork for Web Artisans | [Site web](https://laravel.com/docs/5.3/)| +| [Composer v1.5](https://getcomposer.org/)| Dependency Manager for PHP | [Site web](https://getcomposer.org/doc/00-intro.md), [Download](https://getcomposer.org/download/)| + +## Laravel Packages + +--- + +| **Name** | **Description**| **More infos**| +|------------|----------------|---------------| +| [Lumen v5.3](https://lumen.laravel.com/)| Fast micro-framework by Laravel |[Site web](https://lumen.laravel.com/docs/5.4)| +| [PHP Laravel v5.3](https://laravel.com/)| PHP FrameWork for Web Artisans | [Site web](https://laravel.com/docs/5.3/)| +| [Composer v1.5](https://getcomposer.org/)| Dependency Manager for PHP | [Site web](https://getcomposer.org/doc/00-intro.md), [Download](https://getcomposer.org/download/)| + +## Requirements + +--- + +- All tecnhologies listed before the are necessary. +- This project was build with PHP v7.1, your PHP environnement must set to it. +- A connection to a DB. + +## Installation + +--- + +### Before Started + +### Get Started + +## Routes + +--- + +**Base url** : `/api/v1` + +**Short Notice about the routes** : `Yep` + +**[Formats of objet send and return by this API](./docs/formats.md)** + +### Endpoints + +#### [Entity Resources](../../wiki/DB/Entities) + +- **[`GET` entities](./docs/endpoints/entities/GET_entities.md)** +- **[`GET` entities/:id](./docs/endpoints/entities/GET_entities_id.md)** + +#### [Handle Resources](../../wiki/DB/handles) + +- **[`GET` handles](./docs/endpoints/handles/GET_handles.md)** +- **[`GET` handles/:id](./docs/endpoints/handles/GET_handles_id.md)** + +## Development + +--- + +### Documentation + +### Hints - Guidelines + +### Enhancements + +## Licence + +This project is licensed under the [MIT][info-license] license. + +Copyright © 2017, DataScouts Team + +[info-license]: LICENSE \ No newline at end of file From 9303a93acd5897db9856464358a64f592dd3c33f Mon Sep 17 00:00:00 2001 From: "A. David" Date: Fri, 14 Jul 2017 05:36:14 +0200 Subject: [PATCH 2/4] README.md --- backend/readme.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/backend/readme.md b/backend/readme.md index 3654991..830772c 100644 --- a/backend/readme.md +++ b/backend/readme.md @@ -4,8 +4,6 @@ API for Social Media Aggregator ## Introduction ---- - Hello, welcome onboard. This project design on [#oSoc17](2017.summerofcode.be/) is a little API to fetch data from different social media for specified entities. In short words, APi for Social Media Aggregator. @@ -14,8 +12,6 @@ This purpose of this document is to give an orverview about this project and nec ## Table Of Contents ---- - - [Introduction](#introduction) - [Technologies](#Technologies) - [Laravel Packages](#laravel-packages) @@ -33,8 +29,6 @@ This purpose of this document is to give an orverview about this project and nec ## Technologies ---- - This API exploits the following technologies : | **Name** | **Description**| **More infos**| @@ -45,8 +39,6 @@ This API exploits the following technologies : ## Laravel Packages ---- - | **Name** | **Description**| **More infos**| |------------|----------------|---------------| | [Lumen v5.3](https://lumen.laravel.com/)| Fast micro-framework by Laravel |[Site web](https://lumen.laravel.com/docs/5.4)| @@ -55,24 +47,18 @@ This API exploits the following technologies : ## Requirements ---- - - All tecnhologies listed before the are necessary. - This project was build with PHP v7.1, your PHP environnement must set to it. - A connection to a DB. ## Installation ---- - ### Before Started ### Get Started ## Routes ---- - **Base url** : `/api/v1` **Short Notice about the routes** : `Yep` @@ -93,8 +79,6 @@ This API exploits the following technologies : ## Development ---- - ### Documentation ### Hints - Guidelines From f84b1db9378ee40a2a13b62f2dc6c46fd2520fe8 Mon Sep 17 00:00:00 2001 From: "A. David" Date: Mon, 17 Jul 2017 07:01:48 +0200 Subject: [PATCH 3/4] Endpoint documentation --- backend/docs/routes/GET_ZEN.md | 35 +++++ backend/docs/routes/entities/GET_ENTITIES.md | 53 ++++++++ .../docs/routes/entities/GET_ENTITIES_id.md | 67 ++++++++++ backend/docs/routes/formats.md | 126 ++++++++++++++++++ .../docs/routes/handles/GET_ENTITIEs_url.md | 67 ++++++++++ backend/docs/routes/handles/GET_HANDLES_id.md | 67 ++++++++++ backend/docs/routes/template.md | 28 ++++ 7 files changed, 443 insertions(+) create mode 100644 backend/docs/routes/GET_ZEN.md create mode 100644 backend/docs/routes/entities/GET_ENTITIES.md create mode 100644 backend/docs/routes/entities/GET_ENTITIES_id.md create mode 100644 backend/docs/routes/formats.md create mode 100644 backend/docs/routes/handles/GET_ENTITIEs_url.md create mode 100644 backend/docs/routes/handles/GET_HANDLES_id.md create mode 100644 backend/docs/routes/template.md diff --git a/backend/docs/routes/GET_ZEN.md b/backend/docs/routes/GET_ZEN.md new file mode 100644 index 0000000..1b8ddea --- /dev/null +++ b/backend/docs/routes/GET_ZEN.md @@ -0,0 +1,35 @@ +# Zen + + GET /api/v1/zen + +## Description + +Returns an IT Joke. This endpoint is used to test the connectivity of the API. + +## Parameters + +## Return format + +A JSON Object filled with: + +* joke — The joke + +## Errors + + +## Example + +### **Request** + +``` json + + GET /api/v1/zen +``` + +### **Return** + +``` json + { + joke: "Waiting for the joke. It' comming ...." + } +``` \ No newline at end of file diff --git a/backend/docs/routes/entities/GET_ENTITIES.md b/backend/docs/routes/entities/GET_ENTITIES.md new file mode 100644 index 0000000..e47b0c0 --- /dev/null +++ b/backend/docs/routes/entities/GET_ENTITIES.md @@ -0,0 +1,53 @@ +# Entity Resource + + GET /entities + +## Description + +Returns a listing of all entities. + +## Parameters + +None + +## Return format + +A JSON Object filled an array of entity following the **[entity format][]**. + +## Errors + +None + +## Example + +### **Request** + +``` json + + GET /entities +``` + +### **Return** + +``` json +[ + { + id: 12, + name: "osoc17", + url: "entities_osoc17", + image: "http://2017.summerofcode.be/images/squarelogo-LI.png", + created_at: "2017-07-16 16:04:10", + updated_at: "2017-07-19 20:21:34" + }, + { + id: 23, + name: "crypto blockchain", + url: "entities-crypto-blockchain", + image: null, + created_at: "2017-07-01 16:35:18", + updated_at: "2017-07-13 09:21:57" + } +] +``` + +[entity format]: ../../formats.md#short-format-entity diff --git a/backend/docs/routes/entities/GET_ENTITIES_id.md b/backend/docs/routes/entities/GET_ENTITIES_id.md new file mode 100644 index 0000000..3891bba --- /dev/null +++ b/backend/docs/routes/entities/GET_ENTITIES_id.md @@ -0,0 +1,67 @@ +# Entity Resource + + GET /entities/{id} + +## Description + +Returns a specified **[entity format][]**. + +## Parameters + +- **id** — [integer] The id of the specified **[entity format][]**. + + +## Return format + +A JSON Object filled with an entity following the **[entity format][]**. + +## Errors + +All errors return an HTTP error response with a JSON Object as keys ``message`` about the error, ``request.method`` the method of the received request, ``request.path`` the path used to send the request, ``request.input`` an array containing the parameters sent. + +- **404 Not Found** — An Entity with the specified ID does not exist. + +## Example + +### **Request** + +``` json + GET /entities/12 +``` + +### **Return** + +``` json + { + id: 12, + name: "osoc17", + url: "entities_osoc17", + image: "http://2017.summerofcode.be/images/squarelogo-LI.png", + created_at: "2017-07-16 16:04:10", + updated_at: "2017-07-19 20:21:34" + } + +``` + +### **Wrong Request** + +``` json + GET /entities/abc +``` + +### **Error Response** + +``` json +{ + message: "The requested object is not valid", + request: { + method: "GET", + path: "api/v1/entities/abc", + parameters: [ ] + }, + data: [ ] +} +``` + + +[entity format]: ../../formats.md#short-format-entity diff --git a/backend/docs/routes/formats.md b/backend/docs/routes/formats.md new file mode 100644 index 0000000..2f32587 --- /dev/null +++ b/backend/docs/routes/formats.md @@ -0,0 +1,126 @@ +# Resources Format + +This document details all resources retrievable via the API. + +## Base + +All request for the API must be prefix by ``/api/v1``. + + +## Error Format + +All errors return an HTTP error response with a JSON Object as keys ``message`` about the error, ``request.method`` the method of the received request, ``request.path`` the path used to send the request, ``request.input`` an array containing the parameters sent. + +``` json +{ + message: "The requested object is not valid", + request: { + method: "GET", + path: "api/v1/handle/lorem-ipsum", + parameters: [ ] + }, + data: [ ] +} +``` + +## Default Service + +List of the default service available. + +|ID | Name| Link | Logo |Color +---|----|-------|-------|-------- +|1 | Facebook| https://facebook.com| none| Blue +|2 | Twitter | https://twitter.com| none| Cyan +|3 | Youtube | https://youtube.com| none| Red +|4 | Google+ | https://plus.google.com | none | White +|5 | Instagram|https://instagram.com| none| Gray + + +## User format + +A User is + +The format of a User object includes the following data: + +- **id** — [integer] ID of the user. +- **email** — [string] The email of the user. +- **fullname** — [string] The surname and/or lastname of the user. +- **username** — [string] The username of the user. +- **type** — [enum(admin,**visitor**)] The username of the user. + +## Entity format + +A Entity is + +The format of a Entity object includes the following data: + +- **id** — [integer] ID of the entity, +- **name** — [string] Name of the entity +- **url** — [string] URL of the entity +- **image** — [string] The visual represention of the entity. Upload or fetched from the +- **created_at** — [timestamp] Timestamp of time of entity creation +- **updated_at** — [timestamp] Timestamp of time of entity last update. + +## Handle format + +A Handle is + +The format of a Handle object includes the following data: + +- **id** — [integer] ID of the handle, +- **name** — [string] Name of the handle +- **url** — [string] URL of the handle +- **created_at** — [timestamp] Timestamp of time of handle' creation +- **updated_at** — [timestamp] Timestamp of time of handle' last update. +- **fetched_at** — [timestamp] Timestamp of time of handle' last fetch. +- **is_fetching** — [bit] Timestamp of time of handle last update. +- **entity_id** — [integer] The ID of the attached **[Entity][]**. +- **service_id** — [integer] The ID of the attached **[Service][]**: +- **provider_id** — [integer] The ID of the attached **[Provider][]**: + +## Service format + +A Service is + +The format of a Service object includes the following data: + +- **id** — [integer] ID of the service. +- **name** — [string] Name of the service. +- **link** — [string] The link to website of the service. +- **logo** — [string] The Link of the representing' logo of the service. +- **color** — [string] The color assigned to this service for the rending. +- **created_at** — [timestamp] Timestamp of time of service creation + +## Provider format + +A Provider is + +The format of a Provider object includes the following data: + +- **id** — [integer] ID of the provider. +- **social_id** — [string] The ID assigned on the social media +- **email** — [string] The email of the user. +- **fullname** — [string] The surname and/or lastname of the user. +- **username** — [string] The username of the user. + +## Fetcher format + +A Fetcher is + +The format of a Fetcher object includes the following data: + +- **id** — [integer] ID of the provider. +- **data** — [json] The Data of the +- **handle_id** — [integer] The ID of the attached **[Handle][]**. + + + + +[entity]:[entity-format] +[service]:[service-format] +[handle]:[handle-format] +[provider]:[provider-format] + +[Category]: https://github.com/500px/api-documentation/blob/master/basics/formats_and_terms.md#categories +[gallery kind]: https://github.com/500px/api-documentation/blob/master/basics/formats_and_terms.md#gallery-kinds +[License type]: https://github.com/500px/api-documentation/blob/master/basics/formats_and_terms.md#license_types diff --git a/backend/docs/routes/handles/GET_ENTITIEs_url.md b/backend/docs/routes/handles/GET_ENTITIEs_url.md new file mode 100644 index 0000000..f340531 --- /dev/null +++ b/backend/docs/routes/handles/GET_ENTITIEs_url.md @@ -0,0 +1,67 @@ +# Entity Resource + + GET /entities/{url} + +## Description + +Returns a specified **[entity format][]**. + +## Parameters + +- **URL** — [string] The URL of the specified **[entity format][]**. + + +## Return format + +A JSON Object filled with an entity following the **[entity format][]**. + +## Errors + +All errors return an HTTP error response with a JSON Object as keys ``message`` about the error, ``request.method`` the method of the received request, ``request.path`` the path used to send the request, ``request.input`` an array containing the parameters sent. + +- **404 Not Found** — An Entity with the specified URL does not exist. + +## Example + +### **Request** + +``` json + GET /entities/entities_osoc17 +``` + +### **Return** + +``` json + { + id: 12, + name: "osoc17", + url: "entities_osoc17", + image: "http://2017.summerofcode.be/images/squarelogo-LI.png", + created_at: "2017-07-16 16:04:10", + updated_at: "2017-07-19 20:21:34" + } + +``` + +### **Wrong Request** + +``` json + GET /entities/lorem-ipsum +``` + +### **Error Response** + +``` json +{ + message: "The requested object is not valid", + request: { + method: "GET", + path: "api/v1/entities/lorem-ipsum", + parameters: [ ] + }, + data: [ ] +} +``` + + +[entity format]: ../../formats.md#short-format-entity diff --git a/backend/docs/routes/handles/GET_HANDLES_id.md b/backend/docs/routes/handles/GET_HANDLES_id.md new file mode 100644 index 0000000..2be30c1 --- /dev/null +++ b/backend/docs/routes/handles/GET_HANDLES_id.md @@ -0,0 +1,67 @@ +# Entity Resource + + GET /entities/{id} + +## Description + +Returns a specified **[entity format][]**. + +## Parameters + +- **id** — [integer] The id of the specified **[entity format][]**. + + +## Return format + +A JSON Object filled with an entity following the **[entity format][]**. + +## Errors + +All errors return an HTTP error response with a JSON Object as keys ``message`` about the error, ``request.method`` the method of the received request, ``request.path`` the path used to send the request, ``request.input`` an array containing the parameters sent. + +- **404 Not Found** — An Entity with the specified ID does not exist. + +## Example + +### **Request** + +``` json + GET /entities/12 +``` + +### **Return** + +``` json + { + id: 12, + name: "osoc17", + url: "entities_osoc17", + image: "http://2017.summerofcode.be/images/squarelogo-LI.png", + created_at: "2017-07-16 16:04:10", + updated_at: "2017-07-19 20:21:34" + } + +``` + +### **Wrong Request** + +``` json + GET /entities/abc +``` + +### **Return** + +``` json +{ + message: "The requested object is not valid", + request: { + method: "GET", + path: "api/v1/entities/abc", + parameters: [ ] + }, + data: [ ] +} +``` + + +[entity format]: ../../formats.md#short-format-entity diff --git a/backend/docs/routes/template.md b/backend/docs/routes/template.md new file mode 100644 index 0000000..b9c2a11 --- /dev/null +++ b/backend/docs/routes/template.md @@ -0,0 +1,28 @@ +# Resources + + GET resources/{id} + +## Description + +## Parameters + +## Return format + +## Errors + + +## Example + +### **Request** + +``` json + + Code Example +``` + +### **Return** + +``` json + + Code Example +``` \ No newline at end of file From 5e492662b63242982e86bdf5f677ec09ea50f7c2 Mon Sep 17 00:00:00 2001 From: Ismail Kutlu Date: Thu, 27 Jul 2017 13:34:41 +0200 Subject: [PATCH 4/4] Feature/125 socialmediabutton handle (#141) * First commit * Hovering works + selected state also working --- frontend/css/main.css | 6 ------ frontend/sass/components/_button.scss | 12 ++++++++--- .../src/components/handles/AddHandleModal.vue | 2 ++ .../components/results/WaterfallDisplay.vue | 21 +++++++------------ 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/frontend/css/main.css b/frontend/css/main.css index 3db2b9b..840d371 100644 --- a/frontend/css/main.css +++ b/frontend/css/main.css @@ -2574,16 +2574,10 @@ button { background-color: #f00; } .btn_sm:hover.twitter { background-color: #1DA1F2; } - .btn_sm:hover.twitter:hover { - background-color: #1DA1F2; } .btn_sm:hover.youtube { background-color: #cd201f; } - .btn_sm:hover.youtube:hover { - background-color: #cd201f; } .btn_sm:hover.vimeo { background-color: #4EBBFF; } - .btn_sm:hover.vimeo:hover { - background-color: #4EBBFF; } .btn_sm:hover .fa-active:after { border-color: #1fdcb8; } diff --git a/frontend/sass/components/_button.scss b/frontend/sass/components/_button.scss index 318f6a8..b89307f 100644 --- a/frontend/sass/components/_button.scss +++ b/frontend/sass/components/_button.scss @@ -131,9 +131,15 @@ button { background-color: #f00; } &:hover { - &.twitter { background-color: $twitter; &:hover { background-color: $twitter; }} - &.youtube { background-color: $youtube; &:hover { background-color: $youtube }} - &.vimeo { background-color: $vimeo; &:hover { background-color: $vimeo }} + &.twitter { + background-color: $twitter; + } + &.youtube { + background-color: $youtube; + } + &.vimeo { + background-color: $vimeo; + } } &:hover .fa-active:after { border-color: $primary; diff --git a/frontend/src/components/handles/AddHandleModal.vue b/frontend/src/components/handles/AddHandleModal.vue index a5006ec..fd00f01 100644 --- a/frontend/src/components/handles/AddHandleModal.vue +++ b/frontend/src/components/handles/AddHandleModal.vue @@ -5,7 +5,9 @@
-

What is a member?

-

- Curabitur aliquet quam id dui posuere blandit. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Curabitur aliquet quam id dui posuere blandit. Proin eget tortor risus. -

-

How to add one?

-
    -
  • Step 1
  • -
  • Step 2
  • -
  • Step 3
  • -
-
+

Visualise what your colleagues, friends, companies and competitors are talking about.

+
    +
  • Add the name of your first company or person you want to follow. We call this a member.
  • +
  • Click on the member and add all social media channels for this member.
  • +
  • All done!
  • +
+ +