This file contains hidden or 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 Foundation | |
| struct MovieInfo: Codable { | |
| let name: String? | |
| let releaseDate: String? | |
| let daysSinceRelease: Int? | |
| let collection: String? | |
| let posterUrl: String? | |
| enum CodingKeys: String, CodingKey { |
This file contains hidden or 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 UIKit | |
| import AuthenticationServices | |
| class LoginViewController: UIViewController { | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| setupAppleSignIn() | |
| } | |
This file contains hidden or 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
| router.post('/actions', async (req, res) => { | |
| try { | |
| const payload = JSON.parse(req.body.payload); | |
| console.log("###slack request is "+payload); | |
| var response = ""; | |
| if (payload.callback_id === 'query_selection') { | |
| console.log("option selected is "+payload.actions[0].selected_options[0].value); | |
| switch (payload.actions[0].selected_options[0].value) { | |
| case "openIssues": |
This file contains hidden or 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
| const queryOptions = [{ | |
| text: 'Open Issues', | |
| value: 'opneIssues' | |
| }, { | |
| text: 'Closed Issues', | |
| value: 'closedIssues' | |
| }, { | |
| text: 'Milestones', | |
| value: 'milestones' | |
| }, { |
This file contains hidden or 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
| router.post('/SlackAppDemo',function(req,res) { | |
| try { | |
| const response = { | |
| response_type: 'in_channel', | |
| channel: req.body.channel_id, | |
| text: 'Hey there...:', | |
| attachments: [{ | |
| text: 'What would you like to know in this project?', | |
| fallback: 'What would you like to know in this project?', | |
| color: '#2c963f', |
This file contains hidden or 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
| const express = require('express'); | |
| const bodyParser = require('body-parser'); | |
| const graphqlHttp = require('express-graphql'); | |
| const {buildSchema} = require('graphql'); | |
| const mongoose = require('mongoose'); | |
| const movieSchema = require('./models/movie-schema'); | |
| const Movie = require('./models/movie'); | |
| var app = express(); |
This file contains hidden or 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
| movies: () => { | |
| return Movie.find() | |
| .then(movies => { | |
| return movies.map(movie => { | |
| return { ...movie._doc, _id: movie._doc._id.toString()}; //overwriting id | |
| }); | |
| }) | |
| .catch(err => { | |
| throw err; | |
| }); |
This file contains hidden or 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.exports = {'movieBuildSchema':` | |
| type Movie { | |
| _id: ID! | |
| title: String! | |
| year: Int! | |
| released: String! | |
| genre: String! | |
| director: String! | |
| actors: String! | |
| plot: String! |
This file contains hidden or 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
| const mongoose = require('mongoose'); | |
| const Schema = mongoose.Schema; | |
| const movieSchema = new Schema({ | |
| title: { | |
| type: String, | |
| required: true | |
| }, | |
| year: { |
This file contains hidden or 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
| extension HomeViewController: DragDropViewDelegate | |
| { | |
| func draggedMediaType(type: MediaType, url: NSURL) { | |
| switch type { | |
| case .audio: | |
| self.createDirectory(sourcePath: url.absoluteString!, type: .audio) | |
| case .video: | |
| self.createDirectory(sourcePath: url.absoluteString!, type: .video) | |
| case .image: | |
| self.createDirectory(sourcePath: url.absoluteString!, type: .image) |