Skip to content

Instantly share code, notes, and snippets.

View akshar07's full-sized avatar

Akshar Takle akshar07

View GitHub Profile
const client = new ApolloClient({
link, // httpLink
cache,
resolvers
typeDefs,
});
const client = new ApolloClient({
link, // httpLink
cache,
resolvers: StateResolvers(getState, writeState),
typeDefs,
});
class Bot{
constructor(name, role, relaxTime){
this.name=name;
this.role=role;
this.relaxTime=relaxTime;
}
print(){
console.log("name:" +this.name + " relaxTime: " + this.relaxTime);
}
}
class Bot{
constructor(name, role, relaxTime){
this.name=name;
this.role=role;
this.relaxTime=relaxTime;
}
print(){
console.log("name:" +this.name + " relaxTime: " + this.relaxTime);
}
}
const Manager_Proxy = require('./proxy');
const Fiona = new Manager_Proxy();
const token= "afaf13441"
let report = Fiona.getReport(1,token);
console.log(report);
const Manager = require('./BotManager');
const authentication = require('./Authentication')
class Manager_Proxy{
constructor(){
this.chached_reports = new Map();
}
getReport(id,token){
let valid = authentication.authenticate(token);
// old rental interface
function OldKayakRentals(){
this.request= function(name, time){
// rental quotation calculations
return 30;
}
}
// new rental interface
function NewKayakRentals(){
this.name = function(name){/* set name of renter */}
const BotBuilder= require('./BotBuilder');
//developers
const Elsa = new BotBuilder('Elsa').makeDeveloper().setRelaxTime(100).makeItSing().build();
const Steven = new BotBuilder('Steven').makeDeveloper().setRelaxTime(200).build();
//testers
const Maddie = new BotBuilder('Maddie').makeTester().setRelaxTime(200).makeItSing().build();
const Sanjiti = new BotBuilder('Sanjiti').makeTester().setRelaxTime(400).build();
class Bot{
constructor(builder){
this.name=builder.name;
this.role=builder.role;
this.relaxTime=builder.relaxTime;
this.canSing=builder.canSing;
}
//rest of Bot methods
}
const botFactory= require('./botFactory');
let Eve= botFactory('eve','developer',100);
let Adam= botFactory('adam','tester',200);