Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140140
banning.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
banning.cpp
View Options
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#include
<algorithm>
#include
"banning.hpp"
namespace
Kazv
::
Api
{
BaseJob
::
Query
BanJob::buildQuery
(
)
{
BaseJob
::
Query
_q
;
return
_q
;
}
BaseJob
::
Body
BanJob::buildBody
(
std
::
string
roomId
,
std
::
string
userId
,
std
::
optional
<
std
::
string
>
reason
)
{
// ignore unused param
(
void
)(
roomId
);(
void
)(
userId
);(
void
)(
reason
);
json
_data
=
json
::
object
();
_data
[
"user_id"
s
]
=
userId
;
addToJsonIfNeeded
(
_data
,
"reason"
s
,
reason
);
return
BaseJob
::
JsonBody
(
_data
);
};
BanJob
::
BanJob
(
std
::
string
serverUrl
,
std
::
string
_accessToken
,
std
::
string
roomId
,
std
::
string
userId
,
std
::
optional
<
std
::
string
>
reason
)
:
BaseJob
(
std
::
move
(
serverUrl
),
std
::
string
(
"/_matrix/client/v3"
)
+
"/rooms/"
+
roomId
+
"/ban"
,
POST
,
std
::
string
(
"Ban"
),
_accessToken
,
ReturnType
::
Json
,
buildBody
(
roomId
,
userId
,
reason
)
,
buildQuery
()
,
{}
)
{
}
BanJob
BanJob
::
withData
(
JsonWrap
j
)
&&
{
auto
ret
=
BanJob
(
std
::
move
(
*
this
));
ret
.
attachData
(
j
);
return
ret
;
}
BanJob
BanJob
::
withData
(
JsonWrap
j
)
const
&
{
auto
ret
=
BanJob
(
*
this
);
ret
.
attachData
(
j
);
return
ret
;
}
BanJob
::
JobResponse
::
JobResponse
(
Response
r
)
:
Response
(
std
::
move
(
r
))
{}
bool
BanResponse
::
success
()
const
{
return
Response
::
success
()
&&
isBodyJson
(
body
)
;
}
BaseJob
::
Query
UnbanJob
::
buildQuery
(
)
{
BaseJob
::
Query
_q
;
return
_q
;
}
BaseJob
::
Body
UnbanJob
::
buildBody
(
std
::
string
roomId
,
std
::
string
userId
,
std
::
optional
<
std
::
string
>
reason
)
{
// ignore unused param
(
void
)(
roomId
);(
void
)(
userId
);(
void
)(
reason
);
json
_data
=
json
::
object
();
_data
[
"user_id"
s
]
=
userId
;
addToJsonIfNeeded
(
_data
,
"reason"
s
,
reason
);
return
BaseJob
::
JsonBody
(
_data
);
};
UnbanJob
::
UnbanJob
(
std
::
string
serverUrl
,
std
::
string
_accessToken
,
std
::
string
roomId
,
std
::
string
userId
,
std
::
optional
<
std
::
string
>
reason
)
:
BaseJob
(
std
::
move
(
serverUrl
),
std
::
string
(
"/_matrix/client/v3"
)
+
"/rooms/"
+
roomId
+
"/unban"
,
POST
,
std
::
string
(
"Unban"
),
_accessToken
,
ReturnType
::
Json
,
buildBody
(
roomId
,
userId
,
reason
)
,
buildQuery
()
,
{}
)
{
}
UnbanJob
UnbanJob
::
withData
(
JsonWrap
j
)
&&
{
auto
ret
=
UnbanJob
(
std
::
move
(
*
this
));
ret
.
attachData
(
j
);
return
ret
;
}
UnbanJob
UnbanJob
::
withData
(
JsonWrap
j
)
const
&
{
auto
ret
=
UnbanJob
(
*
this
);
ret
.
attachData
(
j
);
return
ret
;
}
UnbanJob
::
JobResponse
::
JobResponse
(
Response
r
)
:
Response
(
std
::
move
(
r
))
{}
bool
UnbanResponse
::
success
()
const
{
return
Response
::
success
()
&&
isBodyJson
(
body
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Jan 19, 1:36 PM (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55204
Default Alt Text
banning.cpp (3 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment