Attribute | Type | Description |
---|---|---|
version |
int |
The version of the photo collection, will increase as modifications are made |
collectionUUID |
string |
A unique identifier for the collection, it will remain the same with subsequent versions |
title |
string |
The title of the collection |
subtitle |
string |
The subtitle of the collection |
description |
string |
The long description explaining the project |
categories |
Array |
A list of categories the user applied to the collection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json = { | |
id: project.id, | |
name: project.name, | |
street_address_1: project.street_address_1, | |
street_address_2: project.street_address_2, | |
city: project.city, | |
state: project.state, | |
postal_code: project.postal_code, | |
country: project.country, | |
company_id: project.company_id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
can_view_users_photos = current_user.has_permission?(Permission::VIEW_USERS_PHOTOS) | |
@projects.map do |project| | |
Rails.cache.fetch(['v1', "can-view-all-photo-#{can_view_users_photos}", 'recent', project]) do | |
render partial: 'v1/locations/recent/project', locals: { project: project, can_view_users: can_view_users_photos } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"project": { | |
"name": "The Office", | |
"address": { | |
"street_address_1": "3793 West Trickery Rd", | |
"city": "Lincoln", | |
"state": "NE", | |
"postal_code": "68512", | |
"country": "US" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parser": "babel-eslint", | |
"extends": "airbnb", | |
"globals": { | |
"alert": true, | |
"document": true, | |
"FormData": true, | |
"window": true | |
}, | |
"plugins": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller } from 'stimulus'; | |
export default class extends Controller { | |
static targets = ['message'] | |
connect() { | |
this.timeout = setTimeout(this.closeFlash, 2500); | |
} | |
disconnect() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ReactHelper | |
def react_component(name, props: {}, html_class: nil) | |
content_tag( | |
'div', | |
nil, | |
class: html_class, | |
data: { controller: 'react', 'react-component' => name, 'react-props' => react_props(props) } | |
) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set secret key for your application globally | |
CompanyCamConfiguration.SetSecretKey("YourSecretKey"); | |
var requestOptions = new CompanyCamRequestOptions | |
{ | |
ApiKey = "CompanyApiKey", | |
UserEmailAddress = "UserPerformingAction" | |
}; | |
var projectService = new ProjectService(requestOptions); | |
var project = projectService.Create(new Project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// project will be https://docs.companycam.com/#the-project-object | |
const project = await fetch ('https://api.companycam.com/v2/projects', { | |
headers: { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json', | |
'Authorization': 'Bearer {access_token}, | |
'X-CompanyCam-User': '{user_email}', | |
'X-CompanyCam-Secret': '{application_secret}' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Puma HTTP Server for <%= "#{fetch(:application)} (#{fetch(:stage)})" %> | |
After=network.target | |
Requires=puma.socket | |
[Service] | |
Type=simple | |
User=<%= fetch(:deploy_user) %> | |
Environment=RAILS_ENV=<%= fetch(:rails_env) %> |
OlderNewer