Info
Welcome to the generated API reference.
Admin Startup Management
Management of startups by Administrators.
Startups.
Requires authentication
Startups registered by all entrepreneurs, both approved and unapproved
Example request:
const url = new URL(
"http://localhost/api/v1/admin/startups"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/startups',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/startups" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (200):
{
"data": [
{
"id": null,
"uuid": null,
"registration_is_complete": null,
"company_name": null,
"product_image": "http:\/\/localhost\/startups\/products\/",
"caption": null,
"funds_to_raise": null,
"duration_for_raise": null,
"approved": null,
"created_at": null,
"user": null
},
{
"id": null,
"uuid": null,
"registration_is_complete": null,
"company_name": null,
"product_image": "http:\/\/localhost\/startups\/products\/",
"caption": null,
"funds_to_raise": null,
"duration_for_raise": null,
"approved": null,
"created_at": null,
"user": null
}
]
}
HTTP Request
GET api/v1/admin/startups
Startup Detail.
Requires authentication
Startup detail for selected startup.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/startups/2/startup_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/startups/2/startup_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/startups/2/startup_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/admin/startups/{id}/startup_detail
URL Parameters
| Parameter | Status | Description |
|---|---|---|
id |
required | The id of the startup. |
Contact Detail.
Requires authentication
Contact detail for selected startup.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/startups/2/contact_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/startups/2/contact_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/startups/2/contact_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/admin/startups/{id}/contact_detail
URL Parameters
| Parameter | Status | Description |
|---|---|---|
id |
required | The id of the startup. |
Business Model.
Requires authentication
Business Model for selected startup.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/startups/2/business_model"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/startups/2/business_model',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/startups/2/business_model" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/admin/startups/{id}/business_model
URL Parameters
| Parameter | Status | Description |
|---|---|---|
id |
required | The id of the startup. |
Product Detail.
Requires authentication
Product Detail for selected startup.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/startups/2/product_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/startups/2/product_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/startups/2/product_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/admin/startups/{id}/product_detail
URL Parameters
| Parameter | Status | Description |
|---|---|---|
id |
required | The id of the startup. |
Cofounder Detail.
Requires authentication
Cofounder Detail for selected startup.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/startups/2/cofounder_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/startups/2/cofounder_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/startups/2/cofounder_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/admin/startups/{id}/cofounder_detail
URL Parameters
| Parameter | Status | Description |
|---|---|---|
id |
required | The id of the startup. |
Startup Team.
Requires authentication
Startup Team for selected startup.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/startups/2/startup_team"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/startups/2/startup_team',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/startups/2/startup_team" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/admin/startups/{id}/startup_team
URL Parameters
| Parameter | Status | Description |
|---|---|---|
id |
required | The id of the startup |
Startups for Entrepreneur.
Requires authentication
Startups registered by an entrepreneur, both approved and unapproved
Example request:
const url = new URL(
"http://localhost/api/v1/admin/entrepreneur/1/startups"
);
let params = {
"userId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/entrepreneur/1/startups',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'query' => [
'userId'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/entrepreneur/1/startups?userId=1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (200):
{
"data": [
{
"id": null,
"uuid": null,
"registration_is_complete": null,
"company_name": null,
"product_image": "http:\/\/localhost\/startups\/products\/",
"caption": null,
"funds_to_raise": null,
"duration_for_raise": null,
"approved": null,
"created_at": null,
"user": null
},
{
"id": null,
"uuid": null,
"registration_is_complete": null,
"company_name": null,
"product_image": "http:\/\/localhost\/startups\/products\/",
"caption": null,
"funds_to_raise": null,
"duration_for_raise": null,
"approved": null,
"created_at": null,
"user": null
}
]
}
HTTP Request
GET api/v1/admin/entrepreneur/{userId}/startups
Query Parameters
| Parameter | Status | Description |
|---|---|---|
userId |
required | The id of the user (entrepreneur). |
Approve a Startup
Requires authentication
Approve a startup.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/startup/approve"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"startup_id": 1
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/admin/startup/approve',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'startup_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/admin/startup/approve" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"startup_id":1}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
}
}
HTTP Request
POST api/v1/admin/startup/approve
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
startup_id |
integer | required | The id of the startup to approve. |
Investors.
Requires authentication
All investors registered on the system.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/investors"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/investors',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/investors" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/admin/investors
Entrepreneurs.
Requires authentication
All entrepreneurs registered on the system.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/entrepreneurs"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/admin/entrepreneurs',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/admin/entrepreneurs" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/admin/entrepreneurs
Investor
Investor and startups management endpoints.
Startups.
Requires authentication
Startups registered by all entrepreneurs and approved by the admins.
Example request:
const url = new URL(
"http://localhost/api/v1/investor/startups"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/investor/startups',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/investor/startups" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/investor/startups
Complete Investor Profile
Provide required additional data about investor such as a short bio, occupations etc
Requires authentication
Example request:
const url = new URL(
"http://localhost/api/v1/investor/profile/complete"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"bio": "et",
"interest": "nihil",
"startups_invested_in": "ullam",
"amount_invested": "iure",
"occupation": "cupiditate"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/investor/profile/complete',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'bio' => 'et',
'interest' => 'nihil',
'startups_invested_in' => 'ullam',
'amount_invested' => 'iure',
'occupation' => 'cupiditate',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/investor/profile/complete" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"bio":"et","interest":"nihil","startups_invested_in":"ullam","amount_invested":"iure","occupation":"cupiditate"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
}
}
HTTP Request
POST api/v1/investor/profile/complete
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
bio |
string | required | A short bio of investor. |
interest |
string | optional | A short note of investor's interests. |
startups_invested_in |
string | optional | Startups investor invested in if any. |
amount_invested |
string | optional | Amount investor invested in startups if any. |
occupation |
string | required | Occupation(s) of investor. |
Startup Registration
API routes for registering startups on the platform
User(Entrepreneur) Startups.
Requires authentication
Startups registered by the logged in entrepreneur, both approved and unapproved.
Example request:
const url = new URL(
"http://localhost/api/v1/user/startups"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/user/startups',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/user/startups" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/user/startups
Register a Startup
Requires authentication
Registers a startup. First step out of 7 steps.
The same route is used to update the startup, if startup id is provided.
When registration is done, a startup id is returned. This then can be used for the next stages.
Example request:
const url = new URL(
"http://localhost/api/v1/startup/register"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"company_name": "Jane Ventures",
"caption": "ut",
"product_image_file": "dolorum",
"funds_to_raise": "Ghc 234.00",
"duration_for_raise": "3 months.",
"startup_id": 1
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/startup/register',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'company_name' => 'Jane Ventures',
'caption' => 'ut',
'product_image_file' => 'dolorum',
'funds_to_raise' => 'Ghc 234.00',
'duration_for_raise' => '3 months.',
'startup_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/startup/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"company_name":"Jane Ventures","caption":"ut","product_image_file":"dolorum","funds_to_raise":"Ghc 234.00","duration_for_raise":"3 months.","startup_id":1}'
Example response (200):
null
HTTP Request
POST api/v1/startup/register
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
company_name |
string | required | The name of the startup |
caption |
string | required | The caption of the startup. |
product_image_file |
file | optional | The image of the startup product. Do not submit a null image field. |
funds_to_raise |
string | required | The funds to raise for startup |
duration_for_raise |
string | required | The duration needed to raise funds |
startup_id |
integer | optional | The id of the startup if updating |
Data For Startup Details Registration.
Requires authentication
The endpoint provides startup types and startup industries which will be needed
to populate a select input for startup details registration by entrepreneur
Example request:
const url = new URL(
"http://localhost/api/v1/startup/registration/data/startup_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/startup/registration/data/startup_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/startup/registration/data/startup_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (200):
{
"startup_types": {
"data": [
{
"id": 1,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "LLP - Limited liability Partnership"
},
{
"id": 2,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "LP - Limited Partnership"
}
]
},
"startup_industries": {
"data": [
{
"id": 1,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Agriculture"
},
{
"id": 2,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Finance"
}
]
}
}
HTTP Request
GET api/v1/startup/registration/data/startup_detail
Startup Detail for a Startup
Requires authentication
Updates a startup with further startup details.
The same route is used to update.
Example request:
const url = new URL(
"http://localhost/api/v1/startup/startup_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"startup_id": 1,
"startup_type_id": 1,
"startup_industry_id": 1,
"has_patent": true,
"location": "ut",
"business_registration_number": "officiis"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/startup/startup_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'startup_id' => 1,
'startup_type_id' => 1,
'startup_industry_id' => 1,
'has_patent' => true,
'location' => 'ut',
'business_registration_number' => 'officiis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/startup/startup_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"startup_id":1,"startup_type_id":1,"startup_industry_id":1,"has_patent":true,"location":"ut","business_registration_number":"officiis"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
}
}
HTTP Request
POST api/v1/startup/startup_detail
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
startup_id |
integer | required | The id of the startup that startup details belong to |
startup_type_id |
integer | required | The id of the startup type - ie LIMITED |
startup_industry_id |
integer | required | The id of the startup industry - ie Agriculture |
has_patent |
boolean | required | Startup has patent or not. |
location |
string | optional | Startup location. |
business_registration_number |
string | required | Startup business registration number. |
Contact Details for a Startup
Requires authentication
Updates a startup with Contact details.
The same route is used to update.
Example request:
const url = new URL(
"http://localhost/api/v1/startup/contact_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"startup_id": 1,
"id": 1,
"email"<EMAIL_ADDRESS>"phone": "natus",
"facebook_handle": "est",
"twitter_handle": "illo",
"instagram_handle": "et",
"linkdin_handle": "enim",
"skype_handle": "in"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/startup/contact_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'startup_id' => 1,
'id' => 1,
'email' =><EMAIL_ADDRESS>'phone' => 'natus',
'facebook_handle' => 'est',
'twitter_handle' => 'illo',
'instagram_handle' => 'et',
'linkdin_handle' => 'enim',
'skype_handle' => 'in',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/startup/contact_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"startup_id":1,"id":1,"email":"jane@ventures.com","phone":"natus","facebook_handle":"est","twitter_handle":"illo","instagram_handle":"et","linkdin_handle":"enim","skype_handle":"in"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
}
}
HTTP Request
POST api/v1/startup/contact_detail
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
startup_id |
integer | required | The id of the startup that contact details belongs to. |
id |
integer | optional | The id of the contact detail data when updating. This is used to enhance uniqueness validation for email. |
email |
string | required | The email of the startup. |
phone |
string | required | The phone number of the startup. Example<PHONE_NUMBER>8, 383738373 |
facebook_handle |
string | optional | The facebook handle of the startup. |
twitter_handle |
string | optional | The twitter handle of the startup. |
instagram_handle |
string | optional | The instagram handle of the startup. |
linkdin_handle |
string | optional | The linkdin handle of the startup. |
skype_handle |
string | optional | The skype handle of the startup. |
Business Model for a Startup
Requires authentication
Updates a startup with Business model detail.
The same route is used to update.
Example request:
const url = new URL(
"http://localhost/api/v1/startup/business_model"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"startup_id": 1,
"key_resources": "quis",
"customer_target": "magni",
"value_proposition": "minima",
"sales_channels": "dolor",
"revenue_streams": "ea",
"key_metrics": "ad",
"cost_structure": "aut",
"financial_file_upload": "alias",
"optional_file_upload": "ipsam"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/startup/business_model',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'startup_id' => 1,
'key_resources' => 'quis',
'customer_target' => 'magni',
'value_proposition' => 'minima',
'sales_channels' => 'dolor',
'revenue_streams' => 'ea',
'key_metrics' => 'ad',
'cost_structure' => 'aut',
'financial_file_upload' => 'alias',
'optional_file_upload' => 'ipsam',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/startup/business_model" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"startup_id":1,"key_resources":"quis","customer_target":"magni","value_proposition":"minima","sales_channels":"dolor","revenue_streams":"ea","key_metrics":"ad","cost_structure":"aut","financial_file_upload":"alias","optional_file_upload":"ipsam"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
}
}
HTTP Request
POST api/v1/startup/business_model
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
startup_id |
integer | required | The id of the startup that business model belongs to. |
key_resources |
string | optional | Startup key resources. |
customer_target |
string | optional | Startup customer target. |
value_proposition |
string | optional | Startup value proposition. |
sales_channels |
string | optional | Startup sales channel. |
revenue_streams |
string | optional | Startup revenue streams. |
key_metrics |
string | optional | Startup key metrics. |
cost_structure |
string | optional | Startup cost structure. |
financial_file_upload |
file | optional | Startup financial file (format - pdf, word, etc). |
optional_file_upload |
file | optional | Startup optional documents (format - pdf, word, etc). |
Data for Product Detail Registration
Requires authentication
The endpoint provides product progress which will be needed
to populate a select input for startup product details registration by entrepreneur
Example request:
const url = new URL(
"http://localhost/api/v1/startup/registration/data/product_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/startup/registration/data/product_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/startup/registration/data/product_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (200):
{
"data": [
{
"id": 1,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Concept only"
},
{
"id": 2,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Product development"
}
]
}
HTTP Request
GET api/v1/startup/registration/data/product_detail
Product Detail for a Startup
Requires authentication
Updates a startup with product detail.
The same route is used to update.
Example request:
const url = new URL(
"http://localhost/api/v1/startup/product_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"startup_id": 1,
"product_progress_id": 1,
"product_url": "voluptatem"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/startup/product_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'startup_id' => 1,
'product_progress_id' => 1,
'product_url' => 'voluptatem',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/startup/product_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"startup_id":1,"product_progress_id":1,"product_url":"voluptatem"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
}
}
HTTP Request
POST api/v1/startup/product_detail
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
startup_id |
integer | required | The id of the startup that product detail belongs to. |
product_progress_id |
integer | required | The id of the startup progress. |
product_url |
string | optional | Startup product url. |
Data for Cofounder Details registration
Requires authentication
The endpoint provides cofounder roles which will be needed
to populate a select input for startup cofounder details registration by entrepreneur
Example request:
const url = new URL(
"http://localhost/api/v1/startup/registration/data/cofounder_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/startup/registration/data/cofounder_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/startup/registration/data/cofounder_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (200):
{
"data": [
{
"id": 1,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Chairman"
},
{
"id": 2,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Chief Executive Officer"
}
]
}
HTTP Request
GET api/v1/startup/registration/data/cofounder_detail
Cofounder Detail for a Startup
Requires authentication
Updates a startup with product detail.
The same route is used to update.
As part of the parameters provided, the cofounders parameter accepts an array of cofounder personal
information object. The nature is as this:
[
{
name: 'Jane Doe',
email<EMAIL_ADDRESS>cofounder_role_id: 4
},
{
name: 'John Doe',
email<EMAIL_ADDRESS>cofounder_role_id: 5
}
]
The data submitted for cofounders will replace any existing record.
Example request:
const url = new URL(
"http://localhost/api/v1/startup/cofounder_detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"startup_id": 1,
"funding_amount": "3000.0",
"rate_of_devotion": "neque",
"cofounders": []
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/startup/cofounder_detail',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'startup_id' => 1,
'funding_amount' => '3000.0',
'rate_of_devotion' => 'neque',
'cofounders' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/startup/cofounder_detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"startup_id":1,"funding_amount":"3000.0","rate_of_devotion":"neque","cofounders":[]}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
}
}
HTTP Request
POST api/v1/startup/cofounder_detail
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
startup_id |
integer | required | The id of the startup that cofounder detail belongs to |
funding_amount |
numeric | required | The amount for funding |
rate_of_devotion |
string | required | Devotion entrepreneurs put into startup. Could be any of the following: Part time dedication(<35 hours per week), Full time dedication(>35 hours per week), I don’t know |
cofounders |
array | required | name, email, cofounder_role_id object of as many cofounders stored in an array. |
Data for Startup Team registration
Requires authentication
The endpoint provides business teams which will be needed
to populate a select input for startup teams registration by entrepreneur
Example request:
const url = new URL(
"http://localhost/api/v1/startup/registration/data/startup_team"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/startup/registration/data/startup_team',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/startup/registration/data/startup_team" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (200):
{
"data": [
{
"id": 1,
"uuid": "'EIFAJEAF-EAFHEOA-4343D",
"name": "Sales and marketing team",
"description": "Responsible for bringing the product to market. They use several approaches to get the word out regarding their new invention."
},
{
"id": 2,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Operations and Production team",
"description": "Responsible for bringing the product to life. They receive the product's vision and bring it into its finished stage."
}
]
}
HTTP Request
GET api/v1/startup/registration/data/startup_team
Startup Teams for a Startup
Requires authentication
Updates a startup with startup team. This marks the startup registration complete.
The same route is used to update.
Startup team consist of name of person, and the id of the business team member belongs to.
ie. John Belongs to Marketing team.
As part of the parameters provided, the startup_teams parameter accepts an array of members
and their respective business teams. The nature is as this:
[
{
name: 'Jane Doe',
business_team_id: 1, //ie Marketing business team
},
{
name: 'John Doe',
business_team_id: 3, //ie CEO business team
}
]
The data submitted for startup_teams will replace any existing record.
Example request:
const url = new URL(
"http://localhost/api/v1/startup/startup_team"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"startup_id": 1,
"startup_teams": []
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/startup/startup_team',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'startup_id' => 1,
'startup_teams' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/startup/startup_team" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"startup_id":1,"startup_teams":[]}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
}
}
HTTP Request
POST api/v1/startup/startup_team
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
startup_id |
integer | required | The id of the startup that startup teams belongs to |
startup_teams |
array | required | name, business_team_id object of as many startup teams stored in an array. |
System Generated Routes (Ignore)
Authorize a client to access the user's account.
Example request:
const url = new URL(
"http://localhost/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/oauth/authorize',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/authorize
Approve the authorization request.
Example request:
const url = new URL(
"http://localhost/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/oauth/authorize',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
POST oauth/authorize
Deny the authorization request.
Example request:
const url = new URL(
"http://localhost/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://localhost/oauth/authorize',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE \
"http://localhost/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
DELETE oauth/authorize
Authorize a client to access the user's account.
Example request:
const url = new URL(
"http://localhost/oauth/token"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/oauth/token',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/oauth/token" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (400):
{
"error": "unsupported_grant_type",
"error_description": "The authorization grant type is not supported by the authorization server.",
"hint": "Check that all required parameters have been provided",
"message": "The authorization grant type is not supported by the authorization server."
}
HTTP Request
POST oauth/token
Get all of the authorized tokens for the authenticated user.
Example request:
const url = new URL(
"http://localhost/oauth/tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/oauth/tokens',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/oauth/tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/tokens
Delete the given token.
Example request:
const url = new URL(
"http://localhost/oauth/tokens/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://localhost/oauth/tokens/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE \
"http://localhost/oauth/tokens/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
DELETE oauth/tokens/{token_id}
Get a fresh transient token cookie for the authenticated user.
Example request:
const url = new URL(
"http://localhost/oauth/token/refresh"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/oauth/token/refresh',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/oauth/token/refresh" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
POST oauth/token/refresh
Get all of the clients for the authenticated user.
Example request:
const url = new URL(
"http://localhost/oauth/clients"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/oauth/clients',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/oauth/clients" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/clients
Store a new client.
Example request:
const url = new URL(
"http://localhost/oauth/clients"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/oauth/clients',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/oauth/clients" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
POST oauth/clients
Update the given client.
Example request:
const url = new URL(
"http://localhost/oauth/clients/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://localhost/oauth/clients/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X PUT \
"http://localhost/oauth/clients/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
PUT oauth/clients/{client_id}
Delete the given client.
Example request:
const url = new URL(
"http://localhost/oauth/clients/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://localhost/oauth/clients/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE \
"http://localhost/oauth/clients/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
DELETE oauth/clients/{client_id}
Get all of the available scopes for the application.
Example request:
const url = new URL(
"http://localhost/oauth/scopes"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/oauth/scopes',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/oauth/scopes" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/scopes
Get all of the personal access tokens for the authenticated user.
Example request:
const url = new URL(
"http://localhost/oauth/personal-access-tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/oauth/personal-access-tokens',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/oauth/personal-access-tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/personal-access-tokens
Create a new personal access token for the user.
Example request:
const url = new URL(
"http://localhost/oauth/personal-access-tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/oauth/personal-access-tokens',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/oauth/personal-access-tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
POST oauth/personal-access-tokens
Delete the given token.
Example request:
const url = new URL(
"http://localhost/oauth/personal-access-tokens/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://localhost/oauth/personal-access-tokens/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X DELETE \
"http://localhost/oauth/personal-access-tokens/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (419):
{
"message": "CSRF token mismatch."
}
HTTP Request
DELETE oauth/personal-access-tokens/{token_id}
User and Admin Management
APIs for managing users - entrepreneurs and investors
Login a User
Authenticates an entrepreneur or investor.
Example request:
const url = new URL(
"http://localhost/api/v1/user/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"email"<EMAIL_ADDRESS>"password": "magnam"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/user/login',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'email' =><EMAIL_ADDRESS>'password' => 'magnam',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/user/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"email":"mail@mail.com","password":"magnam"}'
Example response (200):
null
Example response (404):
{
"error": {
"code": 422,
"message": "Invalid credentials."
}
}
HTTP Request
POST api/v1/user/login
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
email |
string | required | The email of the user. |
password |
string | required | The password of the user. |
Get User types
Displays listing of user types needed to register for an account on the system
Example request:
const url = new URL(
"http://localhost/api/v1/user/types"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/user/types',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/user/types" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (200):
{
"data": [
{
"id": null,
"uuid": null,
"name": null
},
{
"id": null,
"uuid": null,
"name": null
}
]
}
HTTP Request
GET api/v1/user/types
Register a User
Registers a user as an entrepreneur or investor.
Example request:
const url = new URL(
"http://localhost/api/v1/user/register"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"first_name": "Jane",
"last_name": "Doe",
"picture_upload": "ut",
"user_type_id": 1,
"email"<EMAIL_ADDRESS>"password": "veniam",
"password_confirmation": "repudiandae"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/user/register',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'picture_upload' => 'ut',
'user_type_id' => 1,
'email' =><EMAIL_ADDRESS>'password' => 'veniam',
'password_confirmation' => 'repudiandae',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/user/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"first_name":"Jane","last_name":"Doe","picture_upload":"ut","user_type_id":1,"email":"mail@mail.com","password":"veniam","password_confirmation":"repudiandae"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
},
"data": {
"id": 1,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"first_name": "Jane",
"last_name": "Doe",
"email"<EMAIL_ADDRESS>"picture": "http:\/\/www.fondo.com\/user\/kkjdfj.jpg",
"user_type": "Entrepreneur",
"profile_is_completed": "true",
"token": "7geRI9P4LUFj3ensaxOV070Uk1yXeQ23ptqerJYc"
}
}
HTTP Request
POST api/v1/user/register
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
first_name |
string | required | The first name of the user. |
last_name |
string | required | The last name of the user. |
picture_upload |
file | optional | The image of the person. Do not submit a null picture field. |
user_type_id |
integer | required | The id of the type of user. |
email |
string | required | The email of the user. |
password |
string | required | The password of the user. |
password_confirmation |
string | required | The password confirmation for the password. |
Send Reset Password for User
Generates password reset code for users and sends to mail with instruction.
Example request:
const url = new URL(
"http://localhost/api/v1/user/password/reset/code"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"email"<EMAIL_ADDRESS>}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/user/password/reset/code',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'email' =><EMAIL_ADDRESS>],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/user/password/reset/code" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d<EMAIL_ADDRESS>Example response (200):
{
"success": {
"code": 200,
"message": "The reset code is sent via email. Kindly follow the mail to complete the password reset process."
},
"data": []
}
HTTP Request
POST api/v1/user/password/reset/code
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
email |
string | required | The email of the user. |
Reset Password for User
Reset the password for user using the detail provided.
Example request:
const url = new URL(
"http://localhost/api/v1/user/password/reset/update"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"reset_code": "LKJFAIE",
"email"<EMAIL_ADDRESS>"password": "voluptatem",
"password_confirmation": "debitis"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/user/password/reset/update',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'reset_code' => 'LKJFAIE',
'email' =><EMAIL_ADDRESS>'password' => 'voluptatem',
'password_confirmation' => 'debitis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/user/password/reset/update" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"reset_code":"LKJFAIE","email":"mail@mail.com","password":"voluptatem","password_confirmation":"debitis"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
},
"data": {
"id": 1,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"first_name": "Jane",
"last_name": "Doe",
"email"<EMAIL_ADDRESS>"picture": "http:\/\/www.fondo.com\/user\/kkjdfj.jpg",
"user_type": "Entrepreneur",
"profile_is_completed": "true",
"token": "7geRI9P4LUFj3ensaxOV070Uk1yXeQ23ptqerJYc"
}
}
HTTP Request
POST api/v1/user/password/reset/update
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
reset_code |
string | required | The reset code sent via mail. |
email |
string | required | The email of the user. |
password |
string | required | The password of the user. |
password_confirmation |
string | required | The password confirmation of the user. |
Login an Admin
Authenticates an administrator.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"email"<EMAIL_ADDRESS>"password": "quis"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/admin/login',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'email' =><EMAIL_ADDRESS>'password' => 'quis',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/admin/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"email":"mail@mail.com","password":"quis"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
},
"data": {
"id": 1,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Jane Doe",
"email"<EMAIL_ADDRESS>"token": "7geRI9P4LUFj3ensaxOV070Uk1yXeQ23ptqerJYc"
}
}
Example response (422):
{
"error": {
"code": 422,
"message": "Invalid credentials."
}
}
HTTP Request
POST api/v1/admin/login
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
email |
string | required | The email of the admin. |
password |
string | required | The password of the admin. |
Send Reset Password for Admin
Generates password reset code for admins and sends to mail with instruction.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/password/reset/code"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"email"<EMAIL_ADDRESS>}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/admin/password/reset/code',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'email' =><EMAIL_ADDRESS>],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/admin/password/reset/code" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d<EMAIL_ADDRESS>Example response (200):
{
"success": {
"code": 200,
"message": "The reset code is sent via email. Kindly follow the mail to complete the password reset process."
},
"data": []
}
HTTP Request
POST api/v1/admin/password/reset/code
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
email |
string | required | The email of the admin. |
Reset Password for Admin
Reset the password for admin using the detail provided.
Example request:
const url = new URL(
"http://localhost/api/v1/admin/password/reset/update"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"reset_code": "LKJFAIE",
"email"<EMAIL_ADDRESS>"password": "enim",
"password_confirmation": "minima"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://localhost/api/v1/admin/password/reset/update',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'reset_code' => 'LKJFAIE',
'email' =><EMAIL_ADDRESS>'password' => 'enim',
'password_confirmation' => 'minima',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X POST \
"http://localhost/api/v1/admin/password/reset/update" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"reset_code":"LKJFAIE","email":"mail@mail.com","password":"enim","password_confirmation":"minima"}'
Example response (200):
{
"success": {
"code": 200,
"message": "Request completed successfully."
},
"data": {
"id": 1,
"uuid": "EIFAJEAF-EAFHEOA-4343D",
"name": "Jane Doe",
"email"<EMAIL_ADDRESS>"token": "7geRI9P4LUFj3ensaxOV070Uk1yXeQ23ptqerJYc"
}
}
HTTP Request
POST api/v1/admin/password/reset/update
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
reset_code |
string | required | The reset code sent via mail. |
email |
string | required | The email of the admin. |
password |
string | required | The password of the admin. |
password_confirmation |
string | required | The password confirmation of the admin. |
User Profile
Gets the profile for investor or entrepreneur
Example request:
const url = new URL(
"http://localhost/api/v1/user/profile"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://localhost/api/v1/user/profile',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl -X GET \
-G "http://localhost/api/v1/user/profile" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Example response (401):
{
"error": {
"code": 401,
"message": "Unauthenticated."
}
}
HTTP Request
GET api/v1/user/profile


I’m a software and web developer with a background in leadership, development and end user support. I am proficient with Java in a wide variety of use cases, and actively expanding my development skills in HTML, CSS, Javascript, Bootstrap, React and others.
I have experience with individual, group and leadership roles. I am driven by opportunities for learning, and have a reputation for building positive culture and inspiring collaboration through service leadership, effective teamwork, and strong communication skills.
This page implements JavaScript event listeners to change the DOM based on user actions. I used listeners for drag-and-drop, mousewheel, scroll and button events. There is additional JavaScript code to generate random colors and mutate individual span
elements (designed for desktop).
This is a simple Bootstrap page showing some basic components like the Navbar, Jumbotron and Card Deck. Responsive design means it will scale and rearrange itself for smaller screens like tablets and smart phones.
A responsive two-page React site using synthetic routes via HashRouter (hosted on GitHub Pages). In addition to basic components, I used props
and map()
to build cards from an object array.
The capstone project from Deep Dive Fullstack. Created over 8 weeks in a group of 4 developers. Built on a modified MERN stack (MySQL, Express, React, Node). My main contributions were in backend logic and Redux state management.
A handful of Java implementations taken from class assignments and some independent exercises. Outside of class I did a lot of work on Codingbat and CodeWars to refine my skills and make thinking in Java feel more natural.
I built this app up to the point of minimum viability over the course of 2020. The UI includes AndroidX libraries, View & Data Binding, and a handful of customized RecyclerAdapters. Behind the scenes, a ViewModel serves data from a Room database and a class assembled from ReactiveX and the Jsoup library processes cluttered HTML into simple, text-only recipes.
Tech
Personal
Deep Dive offers full time project-based coding bootcamps. The experience is intense and immersive, both extremely challenging and extremely rewarding.
I completed Deep Dive Java + Android in April of 2020, and I will finish the Fullstack bootcamp in June 2021. Coding connects a lot of the interests that drive my hobbies. I've worked individually and in teams on a wide variety of projects covering Web and Android UI/UX, relational databases, RESTful APIs, and problem-solving using both functional and object-oriented programming. I continue to push myself to learn more and understand better. I plan to recreate Choppit as a responsive web app using the combined knowledge from both bootcamps.
I worked at a Verizon Wireless call center from 2010 to 2018. I didn't expect to be there long, but the opportunities for personal growth and professional development kept me coming back. The Albuquerque center supported new products and services; I saw each of these as an opportunity to develop expertise with each new set of procedures, challenges and work-arounds as fast as possible.
Verizon paid for A+ and Network+ certifications, as well as a Master's in Adult Education. After mastering tech support, I went through leadership training and worked as a Supervisor - either officially or ad hoc - for most of my last 4 years there.


This page provides access to information provided by the Academic Writing team. Refer to the links to the right for essential documents, and for support tools developed at Nagoya and partner institutions.
News from the team appears below. The orange icon is a link to our "news feed", a magic bookmark that shows a stream of the latest items. You can subscribe by clicking on the icon in your browser, or by pasting the URL into a news reader.
All students should subscribe to follow the latest events and announcements from the team.


Saturday is a video camera app engineered for storytelling.
Press and hold anywhere on the camera screen to start capturing footage. Release and repeat until you've pieced together your story.
Edit individual clips: reverse the clip, change its speed, or add captions.


Single Precision Float Matrix Multiplication (gemm) Performance Benchmark
Device:
Operation System:
Data Source:
Abstract Results:
Compute: C = alpha * A * B + beta * C, alpha =
, beta =
Max Dimensions: M=
N=
K=
, step down:
Data Layout: A[M][K], B[K][N], C[M][N], Column Major
Date:
Time Unit:
milliseconds
No.
M
N
K
times
Δ


DineCision
Pick the most exciting place to dine in for you!
Please enter the area (or zipcode) you want to search for:


Manage Files
In this panel you can upload files inside this node. Hint: use drag & drop to reorder files after you uploaded them.
[INPUT|type=file|plugin=drop|name=files|title=Manage here all your uploaded files:files]
[FORM|name=upload:files]
[FILES_ADMIN|file_field=files|sort=weight]


BEKAL FORT
The 300 years old defensive mechanism which is the largest and well-preserved fort makes it one of the best Kasaragod tourist place. You can get an enthralling view of the mesmerizing Arabian sea from the fort’s observation tower which was once used to fire the cannons!


| < Day Day Up > |
6.8. Building More Complicated MacrosSo far, we've covered the basics of writing, executing, and saving keyboard macros. Now let's discuss a couple of more advanced features Emacs lets you add to your macros: pausing a macro for keyboard input and inserting a query in a macro. 6.8.1 Pausing a Macro for Keyboard InputSometimes it's useful to pause a macro briefly so you can type something. For example, if you write a lot of letters, you could have a macro that prints out a template and then pauses for you to fill in variables (such as the date and the recipient's name). You can perform this task (and similar tasks) by inserting a recursive edit into a macro. A recursive edit is just a fancy way to say, "Stop and let me type a while, then pick up the macro where I left off." When you're defining a macro, type C-u C-x q at the point where you want the recursive edit to occur. Emacs enters a recursive edit. (You can tell you're in a recursive edit because square brackets appear on the mode line; you'll see them in the screenshots later in this section.) Nothing you type during the recursive edit becomes a part of the macro. You can type whatever you want to and then press C-M-c to exit the recursive edit. Notice how the square brackets disappear when you type C-M-c. When the square brackets are no longer on the screen, you have left the recursive edit. Anything you type at this point becomes part of the macro. You can put as many pauses in your macros as you want to. <IP_ADDRESS> ExampleHere's an example of a macro that puts a business letter template on the screen and uses recursive edits to let you type your return address, the recipient's name and address, and the date. Because the brackets on the mode line are a pretty subtle clue to what you are going to type, we'll give the user of this macro explicit instructions about what to type. Table 6-3 provides these instructions.
The following screens show what the macro defined in Table 6-3 looks like when you run it.
Now the macro has finished editing; you can type the recipient's name and then the body of the letter, and of course you can go back and edit any of the information you've already filled in. 6.8.2 Adding a Query to a MacroThe more complex the task your macro performs, the more difficult it is to make the macro general enough to work in every case. Although macros can do a lot of things, they aren't programs: you can't have if statements, loops, and the other things you associate with a program. In particular, a macro can't get input from the user and then take some action on the basis of that input. However, one feature lets a macro get input, in a limited way, from the user. You can create a macro that queries the user while it is running; it works much like a query-replace. To create this kind of a macro, type C-x q when you reach the point in the macro definition where you want the macro to query the user. Nothing happens immediately; go on defining the macro as you normally would. Things get interesting later, when you execute the macro. When it gets to the point in the macro where you typed C-x q, Emacs prints a query in the minibuffer: Proceed with macro? (y, n, RET, C-l, C-r) The responses listed here are analogous to those in query-replace:
<IP_ADDRESS> ExampleLet's say that you write a macro that copies comments from a program to another buffer. The comments in our program are preceded by a slash, so you start the macro with a search for a slash. However, not all comments are worth copying. Following the search with a query lets you decide case by case whether the search has found a comment you want to copy. Table 6-4 shows a macro to copy comments to another buffer.
|
| < Day Day Up > |


Cache
Introduction
Some of the data retrieval or processing tasks performed by your application could be CPU intensive or take several seconds to complete. When this is the case, it is common to cache the retrieved data for a time so it can be retrieved quickly on subsequent requests for the same data. The cached data is usually stored in a very fast data store such as Memcached or Redis.
Thankfully, Laravel provides an expressive, unified API for various cache backends, allowing you to take advantage of their blazing fast data retrieval and speed up your web application.
Configuration
Your application's cache configuration file is located at config/cache.php
. In this file, you may specify which cache driver you would like to be used by default throughout your application. Laravel supports popular caching backends like Memcached, Redis, DynamoDB, and relational databases out of the box. In addition, a file based cache driver is available, while array
and "null" cache drivers provide convenient cache backends for your automated tests.
The cache configuration file also contains various other options, which are documented within the file, so make sure to read over these options. By default, Laravel is configured to use the file
cache driver, which stores the serialized, cached objects on the server's filesystem. For larger applications, it is recommended that you use a more robust driver such as Memcached or Redis. You may even configure multiple cache configurations for the same driver.
Driver Prerequisites
Database
When using the database
cache driver, you will need to setup a table to contain the cache items. You'll find an example Schema
declaration for the table below:
Schema::create('cache', function ($table) {
$table->string('key')->unique();
$table->text('value');
$table->integer('expiration');
});
{tip} You may also use the
php artisan cache:table
Artisan command to generate a migration with the proper schema.
Memcached
Using the Memcached driver requires the Memcached PECL package to be installed. You may list all of your Memcached servers in the config/cache.php
configuration file. This file already contains a memcached.servers
entry to get you started:
'memcached' => [
'servers' => [
[
'host' => env('MEMCACHED_HOST', '<IP_ADDRESS>'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
If needed, you may set the host
option to a UNIX socket path. If you do this, the port
option should be set to 0
:
'memcached' => [
[
'host' => '/var/run/memcached/memcached.sock',
'port' => 0,
'weight' => 100
],
],
Redis
Before using a Redis cache with Laravel, you will need to either install the PhpRedis PHP extension via PECL or install the predis/predis
package (~1.0) via Composer. Laravel Sail already includes this extension. In addition, official Laravel deployment platforms such as Laravel Forge and Laravel Vapor have the PhpRedis extension installed by default.
For more information on configuring Redis, consult its Laravel documentation page.
DynamoDB
Before using the DynamoDB cache driver, you must create a DynamoDB table to store all of the cached data. Typically, this table should be named cache
. However, you should name the table based on the value of the stores.dynamodb.table
configuration value within your application's cache
configuration file.
This table should also have a string partition key with a name that corresponds to the value of the stores.dynamodb.key
configuration item within your application's cache
configuration file. By default, the partition key should be named key
.
Cache Usage
Obtaining A Cache Instance
To obtain a cache store instance, you may use the Cache
facade, which is what we will use throughout this documentation. The Cache
facade provides convenient, terse access to the underlying implementations of the Laravel cache contracts:
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Cache;
class UserController extends Controller
{
/**
* Show a list of all users of the application.
*
* @return Response
*/
public function index()
{
$value = Cache::get('key');
//
}
}
Accessing Multiple Cache Stores
Using the Cache
facade, you may access various cache stores via the store
method. The key passed to the store
method should correspond to one of the stores listed in the stores
configuration array in your cache
configuration file:
$value = Cache::store('file')->get('foo');
Cache::store('redis')->put('bar', 'baz', 600); // 10 Minutes
Retrieving Items From The Cache
The Cache
facade's get
method is used to retrieve items from the cache. If the item does not exist in the cache, null
will be returned. If you wish, you may pass a second argument to the get
method specifying the default value you wish to be returned if the item doesn't exist:
$value = Cache::get('key');
$value = Cache::get('key', 'default');
You may even pass a closure as the default value. The result of the closure will be returned if the specified item does not exist in the cache. Passing a closure allows you to defer the retrieval of default values from a database or other external service:
$value = Cache::get('key', function () {
return DB::table(...)->get();
});
Checking For Item Existence
The has
method may be used to determine if an item exists in the cache. This method will also return false
if the item exists but its value is null
:
if (Cache::has('key')) {
//
}
Incrementing / Decrementing Values
The increment
and decrement
methods may be used to adjust the value of integer items in the cache. Both of these methods accept an optional second argument indicating the amount by which to increment or decrement the item's value:
Cache::increment('key');
Cache::increment('key', $amount);
Cache::decrement('key');
Cache::decrement('key', $amount);
Retrieve & Store
Sometimes you may wish to retrieve an item from the cache, but also store a default value if the requested item doesn't exist. For example, you may wish to retrieve all users from the cache or, if they don't exist, retrieve them from the database and add them to the cache. You may do this using the Cache::remember
method:
$value = Cache::remember('users', $seconds, function () {
return DB::table('users')->get();
});
If the item does not exist in the cache, the closure passed to the remember
method will be executed and its result will be placed in the cache.
You may use the rememberForever
method to retrieve an item from the cache or store it forever if it does not exist:
$value = Cache::rememberForever('users', function () {
return DB::table('users')->get();
});
Retrieve & Delete
If you need to retrieve an item from the cache and then delete the item, you may use the pull
method. Like the get
method, null
will be returned if the item does not exist in the cache:
$value = Cache::pull('key');
Storing Items In The Cache
You may use the put
method on the Cache
facade to store items in the cache:
Cache::put('key', 'value', $seconds = 10);
If the storage time is not passed to the put
method, the item will be stored indefinitely:
Cache::put('key', 'value');
Instead of passing the number of seconds as an integer, you may also pass a DateTime
instance representing the desired expiration time of the cached item:
Cache::put('key', 'value', now()->addMinutes(10));
Store If Not Present
The add
method will only add the item to the cache if it does not already exist in the cache store. The method will return true
if the item is actually added to the cache. Otherwise, the method will return false
. The add
method is an atomic operation:
Cache::add('key', 'value', $seconds);
Storing Items Forever
The forever
method may be used to store an item in the cache permanently. Since these items will not expire, they must be manually removed from the cache using the forget
method:
Cache::forever('key', 'value');
{tip} If you are using the Memcached driver, items that are stored "forever" may be removed when the cache reaches its size limit.
Removing Items From The Cache
You may remove items from the cache using the forget
method:
Cache::forget('key');
You may also remove items by providing a zero or negative number of expiration seconds:
Cache::put('key', 'value', 0);
Cache::put('key', 'value', -5);
You may clear the entire cache using the flush
method:
Cache::flush();
{note} Flushing the cache does not respect your configured cache "prefix" and will remove all entries from the cache. Consider this carefully when clearing a cache which is shared by other applications.
The Cache Helper
In addition to using the Cache
facade, you may also use the global cache
function to retrieve and store data via the cache. When the cache
function is called with a single, string argument, it will return the value of the given key:
$value = cache('key');
If you provide an array of key / value pairs and an expiration time to the function, it will store values in the cache for the specified duration:
cache(['key' => 'value'], $seconds);
cache(['key' => 'value'], now()->addMinutes(10));
When the cache
function is called without any arguments, it returns an instance of the Illuminate\Contracts\Cache\Factory
implementation, allowing you to call other caching methods:
cache()->remember('users', $seconds, function () {
return DB::table('users')->get();
});
{tip} When testing call to the global
cache
function, you may use theCache::shouldReceive
method just as if you were testing the facade.
Cache Tags
{note} Cache tags are not supported when using the
file
,dynamodb
, ordatabase
cache drivers. Furthermore, when using multiple tags with caches that are stored "forever", performance will be best with a driver such asmemcached
, which automatically purges stale records.
Storing Tagged Cache Items
Cache tags allow you to tag related items in the cache and then flush all cached values that have been assigned a given tag. You may access a tagged cache by passing in an ordered array of tag names. For example, let's access a tagged cache and put
a value into the cache:
Cache::tags(['people', 'artists'])->put('John', $john, $seconds);
Cache::tags(['people', 'authors'])->put('Anne', $anne, $seconds);
Accessing Tagged Cache Items
To retrieve a tagged cache item, pass the same ordered list of tags to the tags
method and then call the get
method with the key you wish to retrieve:
$john = Cache::tags(['people', 'artists'])->get('John');
$anne = Cache::tags(['people', 'authors'])->get('Anne');
Removing Tagged Cache Items
You may flush all items that are assigned a tag or list of tags. For example, this statement would remove all caches tagged with either people
, authors
, or both. So, both Anne
and John
would be removed from the cache:
Cache::tags(['people', 'authors'])->flush();
In contrast, this statement would remove only cached values tagged with authors
, so Anne
would be removed, but not John
:
Cache::tags('authors')->flush();
Atomic Locks
{note} To utilize this feature, your application must be using the
memcached
,redis
,dynamodb
,database
,file
, orarray
cache driver as your application's default cache driver. In addition, all servers must be communicating with the same central cache server.
Driver Prerequisites
Database
When using the database
cache driver, you will need to setup a table to contain your application's cache locks. You'll find an example Schema
declaration for the table below:
Schema::create('cache_locks', function ($table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
Managing Locks
Atomic locks allow for the manipulation of distributed locks without worrying about race conditions. For example, Laravel Forge uses atomic locks to ensure that only one remote task is being executed on a server at a time. You may create and manage locks using the Cache::lock
method:
use Illuminate\Support\Facades\Cache;
$lock = Cache::lock('foo', 10);
if ($lock->get()) {
// Lock acquired for 10 seconds...
$lock->release();
}
The get
method also accepts a closure. After the closure is executed, Laravel will automatically release the lock:
Cache::lock('foo')->get(function () {
// Lock acquired indefinitely and automatically released...
});
If the lock is not available at the moment you request it, you may instruct Laravel to wait for a specified number of seconds. If the lock can not be acquired within the specified time limit, an Illuminate\Contracts\Cache\LockTimeoutException
will be thrown:
use Illuminate\Contracts\Cache\LockTimeoutException;
$lock = Cache::lock('foo', 10);
try {
$lock->block(5);
// Lock acquired after waiting a maximum of 5 seconds...
} catch (LockTimeoutException $e) {
// Unable to acquire lock...
} finally {
optional($lock)->release();
}
The example above may be simplified by passing a closure to the block
method. When a closure is passed to this method, Laravel will attempt to acquire the lock for the specified number of seconds and will automatically release the lock once the closure has been executed:
Cache::lock('foo', 10)->block(5, function () {
// Lock acquired after waiting a maximum of 5 seconds...
});
Managing Locks Across Processes
Sometimes, you may wish to acquire a lock in one process and release it in another process. For example, you may acquire a lock during a web request and wish to release the lock at the end of a queued job that is triggered by that request. In this scenario, you should pass the lock's scoped "owner token" to the queued job so that the job can re-instantiate the lock using the given token.
In the example below, we will dispatch a queued job if a lock is successfully acquired. In addition, we will pass the lock's owner token to the queued job via the lock's owner
method:
$podcast = Podcast::find($id);
$lock = Cache::lock('processing', 120);
if ($result = $lock->get()) {
ProcessPodcast::dispatch($podcast, $lock->owner());
}
Within our application's ProcessPodcast
job, we can restore and release the lock using the owner token:
Cache::restoreLock('processing', $this->owner)->release();
If you would like to release a lock without respecting its current owner, you may use the forceRelease
method:
Cache::lock('processing')->forceRelease();
Adding Custom Cache Drivers
Writing The Driver
To create our custom cache driver, we first need to implement the Illuminate\Contracts\Cache\Store
contract. So, a MongoDB cache implementation might look something like this:
<?php
namespace App\Extensions;
use Illuminate\Contracts\Cache\Store;
class MongoStore implements Store
{
public function get($key) {}
public function many(array $keys) {}
public function put($key, $value, $seconds) {}
public function putMany(array $values, $seconds) {}
public function increment($key, $value = 1) {}
public function decrement($key, $value = 1) {}
public function forever($key, $value) {}
public function forget($key) {}
public function flush() {}
public function getPrefix() {}
}
We just need to implement each of these methods using a MongoDB connection. For an example of how to implement each of these methods, take a look at the Illuminate\Cache\MemcachedStore
in the Laravel framework source code. Once our implementation is complete, we can finish our custom driver registration by calling the Cache
facade's extend
method:
Cache::extend('mongo', function ($app) {
return Cache::repository(new MongoStore);
});
{tip} If you're wondering where to put your custom cache driver code, you could create an
Extensions
namespace within yourapp
directory. However, keep in mind that Laravel does not have a rigid application structure and you are free to organize your application according to your preferences.
Registering The Driver
To register the custom cache driver with Laravel, we will use the extend
method on the Cache
facade. Since other service providers may attempt to read cached values within their boot
method, we will register our custom driver within a booting
callback. By using the booting
callback, we can ensure that the custom driver is registered just before the boot
method is called on our application's service providers but after the register
method is called on all of the service providers. We will register our booting
callback within the register
method of our application's App\Providers\AppServiceProvider
class:
<?php
namespace App\Providers;
use App\Extensions\MongoStore;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\ServiceProvider;
class CacheServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->booting(function () {
Cache::extend('mongo', function ($app) {
return Cache::repository(new MongoStore);
});
});
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
}
The first argument passed to the extend
method is the name of the driver. This will correspond to your driver
option in the config/cache.php
configuration file. The second argument is a closure that should return an Illuminate\Cache\Repository
instance. The closure will be passed an $app
instance, which is an instance of the service container.
Once your extension is registered, update your config/cache.php
configuration file's driver
option to the name of your extension.
Events
To execute code on every cache operation, you may listen for the events fired by the cache. Typically, you should place these event listeners within your application's App\Providers\EventServiceProvider
class:
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'Illuminate\Cache\Events\CacheHit' => [
'App\Listeners\LogCacheHit',
],
'Illuminate\Cache\Events\CacheMissed' => [
'App\Listeners\LogCacheMissed',
],
'Illuminate\Cache\Events\KeyForgotten' => [
'App\Listeners\LogKeyForgotten',
],
'Illuminate\Cache\Events\KeyWritten' => [
'App\Listeners\LogKeyWritten',
],
];


Women’s Tops
Product Detail Page
About Us Page
Cart Page
Checkout Page
Review Order Page
Confirmation Page
Accessibility Statement Page


THE BORROWERS A film review by Steve Rhodes Copyright 1998 Steve Rhodes
RATING (0 TO ****): *** 1/2
A bottling plant can be a dangerous place if you're only a few inches tall. Stuck in a milk bottle on its way down the assembly line to be filled, you are naturally consumed with terror.
For less enlightened readers, who've never read Mary Norton's novels, a word of explanation is in order. The world is divided in (human) beans, that's us, and Borrowers. Borrowers are actually further divided into innies and outies, much like bellybuttons. Innies are those Borrowers that live inside your walls and under your floorboards. Outies make their way in the more treacherous outside world. You've never seen them, of course, but when a sock seems to have disappeared from your drawer, it was probably a Borrower who took it.
THE BORROWERS tells the story of the Clock family -- father Pod (Jim Broadbent), mother Homily, (Celia Imrie), daughter Arietty (Flora Newbigin) and son Peagreen (Tom Felton) -- who live in the walls of the Lender family's house. A perfectly cast John Goodman plays an odious, real estate developer named Ocious P. Potter, who takes possession of the Lender family's house through nefarious means. To keep possession Potter has to find and destroy the Lender aunt's will that is hidden in the walls of their house. This pits the Borrowers and the Lender's son Pete (Bradley Pierce) against the evil Potter and a good-spirited exterminator named Jeff (Mark Williams), who calls himself "the pest's pest."
Among the film's many delights are Gemma Jackson's sets and Marie France's costumes, both worthy of Oscar consideration. The world as viewed from four inches high has never been more interesting and realistic, thanks to special effects that seem so natural.
Among the many little worlds created, the refrigerator is one of the best. What are those magnets on the front for? Why, to make climbing up easier. After Arietty and Peagreen scale the Lender's refrigerator, they use a Popsicle stick to pry open the door of the freezer, and, once inside, the Arctic-style landscape is amazing. Even better is when they fall down the shaft carrying the ice cubes and almost get caught when the Lenders push the ice button.
The outside world looks like an English industrial town of the 1930s, but the sets have a Dickensian look. To further enrich the complicated time placement, Potter makes calls on his solid-gold cell phone. All of this is filmed by John Fenner and Trevor Brooker with a rust colored cinematography that gives the picture a dreamy, nostalgic look.
The screenplay by Gavin Scott and John Kamps never makes the mistake so common today in kids' movies of setting the tone too dark. This is an imaginative environment where the Borrowers creativity constantly saves the day.
The movie teaches many a good lesson along the way. The serious father, who like all of the Borrowers has a whimsically fun hairstyle, lectures his children on exactly what a Borrower is. "A Borrower is quiet, conscientious, and inconspicuous," he explains. "We don't steal; we borrow."
For those of you who liked the idea of tiny creatures living in walls battling a villain and an exterminator but hated MOUSE HUNT, THE BORROWERS is just picture for you.
The ending, straight out of a Brueghel painting, has a mass of Borrowers so sweet that it may bring tears of joy to your eyes.
"We're not vermin," the Borrower father tells us. "We're not creeps. And we're not pests. We're Borrowers." With the courage of a noble race, he explains that, "We may be small but heaven help anyone who thinks he might squish us."
THE BORROWERS runs a fast 1:23. It is rated PG for cartoonish violence and would be fine for kids four or five and up as well as adults with or without any kids.
My son Jeffrey, almost 9, highly recommends the movie. His favorite scenes are of the army of Borrowers and of the powered skate. His friend Steven, age 9, thought the movie was really funny. His favorite scenes were of the rocket-like skate and of the bad guy getting tied up. Steven's twin John, obviously also 9, thought it was a wonderful movie. He liked the way the tiny Borrowers were able to outsmart the beans.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews